-
Notifications
You must be signed in to change notification settings - Fork 3
/
ember.js
59 lines (59 loc) · 1.67 KB
/
ember.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
module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: [
['@babel/plugin-proposal-decorators', { decoratorsBeforeExport: true }]
]
}
},
plugins: ['ember'],
extends: [
// Extend the base config
'@zestia/eslint-config',
// Extend Ember community recommended ruleset
'plugin:ember/recommended'
],
env: {
browser: true
},
rules: {
// Require that expect is always used
// https://github.com/platinumazure/eslint-plugin-qunit/issues/382#issuecomment-1614400526
'qunit/require-expect': ['error', 'always'],
// Prefer shorthand injection
'ember/no-unnecessary-service-injection-argument': 'error',
// Enforce community based order of methods in components
'ember/order-in-components': 'error',
// Enforce community based order of methods in controllers
'ember/order-in-controllers': 'error',
// Enforce community based order of methods in models
'ember/order-in-models': 'error',
// Enforce community based order of methods in routes
'ember/order-in-routes': 'error'
},
overrides: [
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
extends: [
'@zestia/eslint-config',
'plugin:ember/recommended',
'plugin:ember/recommended-gjs'
],
rules: {
// https://github.com/ember-cli/eslint-plugin-ember/issues/2078
'ember/template-no-let-reference': 'off'
}
},
{
// test files
files: ['tests/**/*-test.js'],
extends: ['plugin:qunit/recommended']
}
]
};