-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
57 lines (55 loc) · 1.23 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
56
57
'use strict';
module.exports = {
root: true,
parserOptions: {
sourceType: 'module',
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'node', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
'plugin:node/recommended',
'prettier',
],
rules: {},
overrides: [
{
parserOptions: {
project: './tsconfig.json',
// allows eslint from any dir
tsconfigRootDir: __dirname,
sourceType: 'module',
},
files: ['src/**/*.ts'],
settings: {
node: {
tryExtensions: ['.js', '.json', '.d.ts', '.ts'],
convertPath: [
{
include: ['src/**/*.ts'],
replace: ['^src/(.+)\\.ts$', 'dist/$1.js'],
},
],
},
},
extends: [],
rules: {
'node/no-unsupported-features/es-syntax': [
'error',
{ ignores: ['modules'] },
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
},
{
env: {
node: true,
mocha: true,
},
files: ['tests/**/*.js'],
},
],
};