Skip to content

Commit

Permalink
Remove lint from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless committed Dec 22, 2020
1 parent 7c246e6 commit 844fe02
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
7 changes: 0 additions & 7 deletions infrastructure/zk/src/fmt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ import * as utils from './utils';

const EXTENSIONS = ['ts', 'md', 'sol', 'js', 'vue'];

// If you wonder why this is written so obscurely through find and not through .prettierignore and globs,
// it's because prettier *first* expands globs and *then* applies ignore rules, which leads to an error
// because it can't expand into volumes folder with not enough access rights, even if it is ignored.
//
// And if we let the shell handle glob expansion instead of prettier, `shopt -s globstar` will be
// disabled (because yarn spawns its own shell that does not load .bashrc) and thus glob patterns
// with double-stars will not work
export async function fmt(extension: string, check: boolean = false) {
if (!EXTENSIONS.includes(extension)) {
throw new Error('Unsupported extension');
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/zk/src/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const LINT_COMMANDS = {
md: 'markdownlint',
sol: 'solhint',
js: 'eslint',
// This line is needed to make eslint ignore eslintrc.js when using .ts files.
// Use .tslintrc.js as the config for linting *.ts files
ts: 'eslint --ext ts --no-eslintrc -c .tslintrc.js'
// This is needed to silence typescipt. It is possible to create type
// guards, but unfortunately they would have rather weird type, so
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@
"zcli": "yarn workspace zcli",
"ts-tests": "yarn workspace ts-tests",
"explorer": "yarn workspace sync-explorer",
"zk": "yarn workspace zk",
"lint:md": "markdownlint $(find . -name '*.md' -print -o -path '*/node_modules' -prune)",
"lint:sol": "solhint contracts/{,dev-}contracts{,/**}/*.sol",
"lint:js": "eslint $(find . -name '*.js' | grep -v 'node_modules\\|build\\|dist\\|.tslintrc.js')",
"lint:ts": "eslint --ext ts --no-eslintrc -c .tslintrc.js $(find . -name '*.ts' | grep -v 'node_modules\\|build\\|dist')"
"zk": "yarn workspace zk"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.10.0",
Expand Down

0 comments on commit 844fe02

Please sign in to comment.