From 7e31cfd4af47cbb0a19427faef3dc8c529d360ee Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Mon, 20 Sep 2021 16:39:39 +1200 Subject: [PATCH 1/3] fix: expand to cover all files not just in subdirectories --- .eslintrc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0484ce98..3d3a626c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,7 +13,7 @@ module.exports = { overrides: [ { /** Overrides for JSON */ - files: ['**/*.json'], + files: ['*.json'], extends: [], rules: {}, parser: '@typescript-eslint/parser', @@ -21,7 +21,7 @@ module.exports = { { /** Overrides for typescript */ - files: ['**/*.ts', '**/*.tsx'], + files: ['*.ts', '*.tsx'], extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'], rules: { '@typescript-eslint/no-unused-vars': 'error', @@ -36,7 +36,7 @@ module.exports = { * All rules in the Typescript overrides are also applied * They can be overwriten here */ - files: ['**/*.test.ts', '**/*.test.tsx'], + files: ['*.test.ts', '*.test.tsx'], rules: { '@typescript-eslint/no-non-null-assertion': 'off', }, From 32730887930d78f21a31e8b80384c9893b67fa16 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Mon, 20 Sep 2021 16:39:54 +1200 Subject: [PATCH 2/3] refactor: apply lint fixes --- config/tsconfig.json | 12 +++++----- package.json | 2 +- tsconfig.base.json | 52 ++++++++++++++++++++++---------------------- tsconfig.json | 14 +++++------- 4 files changed, 39 insertions(+), 41 deletions(-) diff --git a/config/tsconfig.json b/config/tsconfig.json index c649f2d7..eb3af0fe 100644 --- a/config/tsconfig.json +++ b/config/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "@linzjs/style/tsconfig.base.json", - "compilerOptions": { - "lib": ["ES2020"], - "outDir": "build" - } -} \ No newline at end of file + "extends": "@linzjs/style/tsconfig.base.json", + "compilerOptions": { + "lib": ["ES2020"], + "outDir": "build" + } +} diff --git a/package.json b/package.json index 2666f02c..39423371 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsc", "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", - "lint": "npx eslint {src/**,*.js}" + "lint": "npx eslint ." }, "devDependencies": { "@types/node": "^16.7.10", diff --git a/tsconfig.base.json b/tsconfig.base.json index a0352479..4a437ee1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,28 +1,28 @@ { - "compilerOptions": { - "composite": true, - "target": "ES2018", - "module": "commonjs", - "lib": [], - "declaration": true, - "declarationMap": true, - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "noImplicitThis": true, - "alwaysStrict": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": false, - "inlineSourceMap": true, - "inlineSources": true, - "noEmitOnError": false, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "resolveJsonModule": true, - "baseUrl": "./", - } + "compilerOptions": { + "composite": true, + "target": "ES2018", + "module": "commonjs", + "lib": [], + "declaration": true, + "declarationMap": true, + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "noImplicitThis": true, + "alwaysStrict": true, + "noUnusedLocals": false, + "noUnusedParameters": false, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": false, + "inlineSourceMap": true, + "inlineSources": true, + "noEmitOnError": false, + "experimentalDecorators": true, + "strictPropertyInitialization": false, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "resolveJsonModule": true, + "baseUrl": "./" + } } diff --git a/tsconfig.json b/tsconfig.json index 1fd825c5..841f72e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,7 @@ { - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "build", - "lib": [ - "ES2020" - ] - } -} \ No newline at end of file + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "build", + "lib": ["ES2020"] + } +} From df5926b56774f184835f95aa97b48617355c9324 Mon Sep 17 00:00:00 2001 From: Blayne Chard Date: Wed, 22 Sep 2021 09:54:57 +1200 Subject: [PATCH 3/3] refactor: use .gitignore for ignoring eslint files --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 39423371..c2b3f056 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "scripts": { "build": "tsc", "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", - "lint": "npx eslint ." + "lint": "npx eslint . --ignore-path .gitignore" }, "devDependencies": { "@types/node": "^16.7.10",