This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.js
95 lines (94 loc) · 3.08 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
module.exports = {
root: true,
overrides: [
{
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
plugins: ['@typescript-eslint', 'ember', 'mirego'],
extends: ['plugin:mirego/recommended', 'prettier'],
files: ['app/**/*', 'fastboot/**/*', 'tests/**/*', 'types/**/*'],
env: {
es6: true,
browser: true,
},
globals: {
RUNTIME_ENVIRONMENT: 'readonly',
},
rules: {
'ember/closure-actions': 2,
'ember/named-functions-in-promises': 0,
'ember/new-module-imports': 2,
'ember/no-global-jquery': 2,
'ember/no-on-calls-in-components': 2,
'ember/no-duplicate-dependent-keys': 2,
'ember/no-side-effects': 2,
'ember/avoid-leaking-state-in-ember-objects': 2,
'ember/use-brace-expansion': 2,
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/array-type': [2, {default: 'array-simple'}],
'@typescript-eslint/await-thenable': 2,
'@typescript-eslint/consistent-type-assertions': [2, {assertionStyle: 'as'}],
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
'@typescript-eslint/member-delimiter-style': [
2,
{
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/member-ordering': 2,
'@typescript-eslint/no-empty-interface': 2,
'@typescript-eslint/no-floating-promises': 2,
'@typescript-eslint/no-misused-new': 2,
'@typescript-eslint/no-misused-promises': 2,
'@typescript-eslint/no-non-null-assertion': 2,
'@typescript-eslint/no-parameter-properties': 2,
'@typescript-eslint/no-require-imports': 2,
'@typescript-eslint/no-unnecessary-type-assertion': 2,
'@typescript-eslint/promise-function-async': 2,
'@typescript-eslint/require-await': 2,
'@typescript-eslint/type-annotation-spacing': 2,
'@typescript-eslint/unified-signatures': 2,
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': ['error', {argsIgnorePattern: '^_', varsIgnorePattern: '^_'}],
},
},
{
files: [
'.ember-cli.js',
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'testem.js',
'config/**/*.js',
'lib/*/index.js',
'scripts/**/*.js',
'node-server/**/*.js',
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015,
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
rules: {
'@typescript-eslint/no-require-imports': 0,
// this can be removed once the following is fixed
// https://github.com/mysticatea/eslint-plugin-node/issues/77
'node/no-unpublished-require': 'off',
},
extends: ['plugin:node/recommended'],
},
],
};