Skip to content

Commit e911e38

Browse files
committed
use shared eslint
1 parent abe9870 commit e911e38

File tree

2 files changed

+6
-55
lines changed

2 files changed

+6
-55
lines changed

.eslintrc.js

+3-47
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,13 @@
11
const { peerDependencies } = require('./package.json');
22

33
module.exports = {
4-
root: true,
5-
parser: 'babel-eslint',
6-
7-
parserOptions: {
8-
ecmaVersion: 2019,
9-
ecmaFeatures: {
10-
impliedStrict: true
11-
},
12-
},
13-
14-
plugins: [
15-
'prefer-arrow',
16-
],
17-
18-
env: {
19-
node: true,
20-
es6: true,
21-
browser: true,
22-
},
23-
24-
settings: {
25-
react: {
26-
version: 'detect',
27-
},
28-
},
294

305
extends: [
31-
'eslint:recommended',
32-
'plugin:react/recommended',
33-
'airbnb-base',
6+
'@edwmurph/eslint-config',
7+
'@edwmurph/eslint-config/react',
348
],
359

3610
rules: {
37-
'import/no-unresolved': ["error", { ignore: Object.keys(peerDependencies) }],
38-
'react/prop-types': [0],
39-
'no-console': [0],
40-
'class-methods-use-this': [0],
41-
'object-curly-spacing': ['error', 'always'],
42-
'no-trailing-spaces': ['error'],
43-
'no-irregular-whitespace': ['error'],
44-
'no-await-in-loop': ['off'],
45-
'object-curly-newline': [0],
46-
semi: [ 'error', 'always' ],
47-
indent: ['error', 2],
48-
'prefer-arrow/prefer-arrow-functions': [
49-
'error',
50-
{
51-
disallowPrototype: true,
52-
singleReturnOnly: false,
53-
classPropertiesAllowed: false,
54-
}
55-
]
11+
'import/no-unresolved': ['error', { ignore: Object.keys(peerDependencies) }],
5612
},
5713
};

package.json

+3-8
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,21 @@
55
"main": "build/index.js",
66
"scripts": {
77
"lint": "eslint .",
8+
"lint-fix": "eslint . --fix",
89
"build": "babel src -d build --copy-files",
910
"prepare": "npm run build"
1011
},
1112
"peerDependencies": {
1213
"react": "^16",
1314
"three": "^0"
1415
},
15-
"dependencies": {
16-
},
16+
"dependencies": {},
1717
"devDependencies": {
1818
"@babel/cli": "7.10.4",
1919
"@babel/core": "7.10.4",
2020
"@babel/preset-env": "7.10.4",
2121
"@babel/preset-react": "7.10.4",
22-
"babel-eslint": "10.1.0",
23-
"eslint": "6.8.0",
24-
"eslint-config-airbnb-base": "14.1.0",
25-
"eslint-plugin-import": "2.20.1",
26-
"eslint-plugin-prefer-arrow": "1.1.7",
27-
"eslint-plugin-react": "7.19.0"
22+
"@edwmurph/eslint-config": "0.0.1"
2823
},
2924
"repository": {
3025
"type": "git",

0 commit comments

Comments
 (0)