Skip to content

Commit 84fa60a

Browse files
committed
feat: replace eslint-config-standard with eslint-config-standard-with-typescript, use @boringcodes/eslint-config for linting this repo
1 parent 18c9772 commit 84fa60a

File tree

4 files changed

+36
-29
lines changed

4 files changed

+36
-29
lines changed

.eslintrc.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1 @@
1-
module.exports = {
2-
extends: [
3-
// https://github.com/standard/eslint-config-standard
4-
'standard',
5-
6-
// https://github.com/typescript-eslint/typescript-eslint
7-
'plugin:@typescript-eslint/eslint-recommended',
8-
9-
// https://github.com/prettier/eslint-config-prettier#example-configuration
10-
'prettier',
11-
'prettier/@typescript-eslint',
12-
'prettier/standard',
13-
],
14-
15-
// https://github.com/typescript-eslint/typescript-eslint
16-
plugins: ['@typescript-eslint'],
17-
parser: '@typescript-eslint/parser',
18-
19-
rules: {
20-
// https://github.com/standard/standard#typescript
21-
'no-unused-vars': 'off',
22-
'@typescript-eslint/no-unused-vars': 'error',
23-
},
24-
};
1+
module.exports = require('@boringcodes/eslint-config');

index.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
module.exports = require('./.eslintrc.js');
1+
module.exports = {
2+
extends: [
3+
// https://github.com/standard/eslint-config-standard-with-typescript
4+
'standard-with-typescript',
5+
6+
// https://github.com/prettier/eslint-config-prettier#example-configuration
7+
'prettier',
8+
'prettier/@typescript-eslint',
9+
'prettier/standard',
10+
],
11+
12+
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/README.md#configuration
13+
plugins: ['@typescript-eslint'],
14+
parser: '@typescript-eslint/parser',
15+
parserOptions: {
16+
project: './tsconfig.json',
17+
},
18+
};

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
"release:patch": "yarn release --release-as patch"
1818
},
1919
"devDependencies": {
20+
"@boringcodes/eslint-config": "^1.0.0",
2021
"@typescript-eslint/eslint-plugin": "^2.25.0",
21-
"@typescript-eslint/parser": "^2.25.0",
2222
"eslint": "^6.8.0",
2323
"eslint-config-prettier": "^6.10.1",
2424
"eslint-config-standard": "^14.1.1",
25+
"eslint-config-standard-with-typescript": "^15.0.1",
2526
"eslint-plugin-import": "^2.20.1",
2627
"eslint-plugin-node": "^11.0.0",
2728
"eslint-plugin-promise": "^4.2.1",
@@ -32,10 +33,9 @@
3233
},
3334
"peerDependencies": {
3435
"@typescript-eslint/eslint-plugin": "^2.25.0",
35-
"@typescript-eslint/parser": "^2.25.0",
3636
"eslint": "^6.8.0",
3737
"eslint-config-prettier": "^6.10.1",
38-
"eslint-config-standard": "^14.1.1",
38+
"eslint-config-standard-with-typescript": "^15.0.1",
3939
"eslint-plugin-import": "^2.20.1",
4040
"eslint-plugin-node": "^11.0.0",
4141
"eslint-plugin-promise": "^4.2.1",

yarn.lock

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
dependencies:
3131
regenerator-runtime "^0.13.4"
3232

33+
"@boringcodes/eslint-config@^1.0.0":
34+
version "1.0.0"
35+
resolved "https://registry.yarnpkg.com/@boringcodes/eslint-config/-/eslint-config-1.0.0.tgz#1c2366b00c92a25bf6bc2ddcfd8b06cf9aee8652"
36+
integrity sha512-q4HNHiwnYNAXihskDCOMIv3xasefGNi10ax11iXJlC8e4Gg1TResJ+WdDpfZJ7+mHRaYKFDgKXI6ia/IfF7tLw==
37+
3338
"@types/color-name@^1.1.1":
3439
version "1.1.1"
3540
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
@@ -70,7 +75,7 @@
7075
eslint-scope "^5.0.0"
7176
eslint-utils "^2.0.0"
7277

73-
"@typescript-eslint/parser@^2.25.0":
78+
"@typescript-eslint/parser@^2.24.0":
7479
version "2.25.0"
7580
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.25.0.tgz#abfb3d999084824d9a756d9b9c0f36fba03adb76"
7681
integrity sha512-mccBLaBSpNVgp191CP5W+8U1crTyXsRziWliCqzj02kpxdjKMvFHGJbK33NroquH3zB/gZ8H511HEsJBa2fNEg==
@@ -727,6 +732,14 @@ eslint-config-prettier@^6.10.1:
727732
dependencies:
728733
get-stdin "^6.0.0"
729734

735+
eslint-config-standard-with-typescript@^15.0.1:
736+
version "15.0.1"
737+
resolved "https://registry.yarnpkg.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-15.0.1.tgz#cf9fa98c089f02d3c24335f4096d2a1c15161d7b"
738+
integrity sha512-Bsk21CA1WV5K+MVrYM8CV7dbnflNFmrL22Dahi3M3VQp8hPFVnsAlgXmN9CMTXEKpP048semsZeIdYQttSoqBA==
739+
dependencies:
740+
"@typescript-eslint/parser" "^2.24.0"
741+
eslint-config-standard "^14.1.1"
742+
730743
eslint-config-standard@^14.1.1:
731744
version "14.1.1"
732745
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea"

0 commit comments

Comments
 (0)