Skip to content

Commit d565e7e

Browse files
author
James Fox
committed
configure eslint and add yarn lint script
1 parent da39fd1 commit d565e7e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ module.exports = {
66
ecmaVersion: 2017,
77
sourceType: 'module',
88
},
9+
env: {
10+
browser: true,
11+
es6: true,
12+
jest: true,
13+
mocha: true,
14+
node: true,
15+
},
916
extends: [
1017
'eslint:recommended',
1118
'plugin:@typescript-eslint/recommended',
@@ -15,4 +22,9 @@ module.exports = {
1522
'plugin:prettier/recommended',
1623
'prettier/react',
1724
],
25+
rules: {
26+
'@typescript-eslint/ban-ts-ignore': 'off',
27+
'@typescript-eslint/camelcase': 'off',
28+
'@typescript-eslint/no-empty-function': 'off',
29+
},
1830
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"scripts": {
2121
"tsc": "rm -rf lib/ && tsc",
2222
"build": "rm -rf dist/ && node ./scripts/build.js",
23-
"lint": "tsc --noEmit && eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
23+
"lint": "tsc --noEmit && eslint 'src/**/*.{js,ts,tsx}' --quiet --fix",
2424
"test": "jest --silent",
2525
"prepublishOnly": "npm run test && npm run build"
2626
},

0 commit comments

Comments
 (0)