Added prettier and eslint

This commit is contained in:
mrfry 2020-10-23 11:06:32 +02:00
parent 5385ef67b6
commit b2982425f1
2 changed files with 31 additions and 0 deletions

24
.eslintrc.js Normal file
View file

@ -0,0 +1,24 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true,
jest: true,
},
parser: 'babel-eslint',
extends: ['eslint:recommended', 'plugin:react/recommended'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
rules: {
'no-undef': ['error'],
eqeqeq: ['warn', 'smart'],
'no-unused-vars': 'warn',
'no-prototype-builtins': 'off',
'id-length': [
'warn',
{ exceptions: ['i', 'j', 't', 'Q', 'A', 'C', 'q', 'a', 'b'] },
],
},
}

7
.prettierrc.js Normal file
View file

@ -0,0 +1,7 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: false,
singleQuote: true,
arrowParens: 'always',
}