-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc.js
30 lines (30 loc) · 1.17 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/recommended', // Base rules configuration from Eslint, adapted to Typescript
'prettier/@typescript-eslint', // disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors,, so that they can be fixed automatically with `eslint --fix`. Make sure this is always the last configuration in the extends array.
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'prettier'],
rules: {
indent: ['off', 'tab', { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
'no-useless-escape': [0, 'unix'],
semi: ['error', 'always'],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
ignorePatterns: ['./old/', './node_modules/'],
};