Skip to content

Commit b002c77

Browse files
committed
added ESlint, updated settings for prettier
1 parent 1840c0d commit b002c77

File tree

4 files changed

+4156
-1209
lines changed

4 files changed

+4156
-1209
lines changed

.eslintrc.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
jest: true,
6+
},
7+
extends: ['plugin:@typescript-eslint/recommended', 'airbnb', 'prettier'],
8+
globals: {
9+
Atomics: 'readonly',
10+
SharedArrayBuffer: 'readonly',
11+
},
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
ecmaFeatures: {
15+
jsx: true,
16+
modules: true,
17+
},
18+
ecmaVersion: 2018,
19+
sourceType: 'module',
20+
},
21+
plugins: ['prettier', '@typescript-eslint'],
22+
settings: {
23+
'import/parsers': {
24+
'@typescript-eslint/parser': ['.ts', '.tsx'],
25+
},
26+
'import/resolver': {
27+
typescript: {},
28+
},
29+
},
30+
rules: {
31+
'import/no-extraneous-dependencies': [2, { devDependencies: ['**/test.tsx', '**/test.ts'] }],
32+
'import/extensions': 'off',
33+
'import/prefer-default-export': 'off',
34+
'jsx-a11y/label-has-associated-control': [
35+
2,
36+
{
37+
labelComponents: [],
38+
labelAttributes: ['label'],
39+
controlComponents: ['Input'],
40+
depth: 3,
41+
},
42+
],
43+
},
44+
};

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"printWidth": 120,
33
"trailingComma": "all",
4-
"singleQuote": false
4+
"tabWidth": 2,
5+
"singleQuote": true
56
}

0 commit comments

Comments
 (0)