Skip to content

Commit 94373c2

Browse files
committed
Chore: update eslintrc
1 parent 862b193 commit 94373c2

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

.eslintrc.js

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,46 @@
11
module.exports = {
2-
"extends": "airbnb-base",
3-
"plugins": [
4-
"import"
2+
env: {
3+
browser: true,
4+
es6: true,
5+
jest: true,
6+
},
7+
extends: [
8+
'plugin:@typescript-eslint/recommended',
9+
'airbnb-base'
510
],
6-
"parserOptions": {
7-
"ecmaFeatures": {
8-
"jsx": true
9-
}
11+
plugins: ['@typescript-eslint'],
12+
parser: '@typescript-eslint/parser',
13+
globals: {
14+
Atomics: 'readonly',
15+
SharedArrayBuffer: 'readonly',
16+
},
17+
parserOptions: {
18+
ecmaVersion: 2018,
19+
sourceType: 'module',
1020
},
11-
"rules": {
12-
// disabled until babel rewrite
13-
"strict": 1,
14-
"no-param-reassign": 1,
15-
"max-len": 1,
16-
"no-shadow": 1,
21+
settings: {
22+
'import/resolver': {
23+
node: {
24+
extensions: ['.js', '.ts'],
25+
},
26+
},
27+
},
28+
overrides: [
29+
{
30+
files: ['*.ts', '*.tsx'],
31+
rules: {
32+
'no-dupe-class-members': 'off',
33+
},
34+
},
35+
],
36+
rules: {
37+
'@typescript-eslint/explicit-function-return-type': ['warn', {
38+
allowTypedFunctionExpressions: true,
39+
allowExpressions: true,
40+
}],
41+
'import/extensions': ['error', 'ignorePackages', {
42+
js: 'never',
43+
ts: 'never',
44+
}],
1745
}
1846
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"test": "nyc ava -s",
88
"build": "tsc && babel dest -d dest",
9-
"lint": "eslint lib index.js test",
9+
"lint": "eslint lib test",
1010
"fix": "npm run lint -- --fix",
1111
"prepublish": "npm run build",
1212
"coveralls": "nyc report --reporter=text-lcov | coveralls"

0 commit comments

Comments
 (0)