forked from danvk/source-map-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
55 lines (55 loc) · 1.55 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module.exports = {
root: true,
"ignorePatterns": [
"**/*.*",
"**/*.js",
"!**/*.ts",
"node_modules",
"/bin",
"/lib",
"tests/data",
"tests/generate-data/src",
"*vendor*",
],
env: {
commonjs: true,
node: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./src/cli/tsconfig.json', './src/lib/tsconfig.json', './tests/tsconfig.json'],
},
plugins: ['prettier', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
rules: {
'func-style': ['error', 'declaration'],
'object-shorthand': 'error',
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: ['const', 'let'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let'], next: ['const', 'let'] },
],
'no-console': 'off',
yoda: 'error',
// TypeScript specific
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowExpressions: true, allowTypedFunctionExpressions: true },
],
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, classes: true, variables: true, typedefs: true },
],
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
},
};