-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
113 lines (112 loc) · 2.69 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
'use strict';
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }],
],
},
},
plugins: ['ember', '@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
env: {
browser: true,
},
rules: {
'no-setter-return': 0,
quotes: [2, 'single'],
'ember/no-observers': 0,
'ember/avoid-leaking-state-in-ember-objects': 2,
'ember/no-jquery': 2,
'ember/no-get': 2,
'ember/no-actions-hash': 2,
'ember/order-in-components': 2,
'ember/no-test-and-then': 2,
'ember/no-test-import-export': 2,
'ember/no-test-module-for': 2,
'ember/no-test-this-render': 2,
'ember/no-empty-glimmer-component-classes': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-explicit-any': [1, { ignoreRestArgs: true }],
},
overrides: [
{
files: ['./addon-test-support/**', './tests/{integration,unit}/**'],
rules: {
'ember/no-array-prototype-extensions': 0,
},
},
{
// enable the rule specifically for TypeScript files
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 2,
'@typescript-eslint/no-var-requires': 2,
},
},
// node tests
{
files: ['./node-tests/**'],
env: {
mocha: true,
},
},
// node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
'./node-tests/**/*.js',
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
extends: ['plugin:n/recommended'],
},
{
// test files
files: ['tests/**/*-test.{js,ts}'],
extends: ['plugin:qunit/recommended'],
env: {
embertest: true,
},
globals: {
server: true,
Prism: true,
},
rules: {
'ember/no-get': 0,
},
},
],
};