Improve lint:js and lint:ts setup
- Use typescript to report unused variables - Properly pass filenames-glob param to eslint
This commit is contained in:
parent
ba11117cc8
commit
a30b020ac9
|
|
@ -11,6 +11,8 @@ module.exports = {
|
||||||
"@typescript-eslint"
|
"@typescript-eslint"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/explicit-module-boundary-types": "off"
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||||
|
// Better handled by TypeScript
|
||||||
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint:ts": "tsc --noEmit",
|
"lint:ts": "tsc --noEmit",
|
||||||
"lint:js": "eslint src/**/* .eslintrc.js",
|
"lint:js": "eslint 'src/**/*'",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"test:1": "ts-node src/index.ts examples/threshold-pushing.txt",
|
"test:1": "ts-node src/index.ts examples/threshold-pushing.txt",
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,12 @@
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noImplicitReturns": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue