|
| 1 | +'use strict'; |
| 2 | + |
1 | 3 | module.exports = {
|
2 | 4 | root: true,
|
3 | 5 | parser: 'babel-eslint',
|
4 | 6 | parserOptions: {
|
5 | 7 | ecmaVersion: 2018,
|
6 |
| - sourceType: 'module' |
| 8 | + sourceType: 'module', |
| 9 | + ecmaFeatures: { |
| 10 | + legacyDecorators: true, |
| 11 | + }, |
7 | 12 | },
|
8 |
| - plugins: [ |
9 |
| - 'ember' |
10 |
| - ], |
| 13 | + plugins: ['ember'], |
11 | 14 | extends: [
|
12 | 15 | 'eslint:recommended',
|
13 |
| - 'plugin:ember/recommended' |
| 16 | + 'plugin:ember/recommended', |
| 17 | + 'plugin:prettier/recommended', |
14 | 18 | ],
|
15 | 19 | env: {
|
16 |
| - browser: true |
17 |
| - }, |
18 |
| - rules: { |
19 |
| - 'ember/closure-actions': 'off', |
20 |
| - "no-console": ["error", {allow: ["warn", "error"]}], |
21 |
| - 'arrow-spacing': 'error' |
| 20 | + browser: true, |
22 | 21 | },
|
| 22 | + rules: {}, |
23 | 23 | overrides: [
|
24 | 24 | // node files
|
25 | 25 | {
|
26 | 26 | files: [
|
27 |
| - '.eslintrc.js', |
28 |
| - '.prettierrc.js', |
29 |
| - '.template-lintrc.js', |
30 |
| - 'ember-cli-build.js', |
31 |
| - 'index.js', |
32 |
| - 'testem.js', |
33 |
| - 'blueprints/*/index.js', |
34 |
| - 'config/**/*.js', |
35 |
| - 'tests/dummy/config/**/*.js' |
36 |
| - ], |
37 |
| - excludedFiles: [ |
38 |
| - 'addon/**', |
39 |
| - 'addon-test-support/**', |
40 |
| - 'app/**', |
41 |
| - 'tests/dummy/app/**' |
| 27 | + './.eslintrc.js', |
| 28 | + 'tests/.eslintrc.js', |
| 29 | + './.prettierrc.js', |
| 30 | + './.template-lintrc.js', |
| 31 | + './ember-cli-build.js', |
| 32 | + './index.js', |
| 33 | + './testem.js', |
| 34 | + './blueprints/*/index.js', |
| 35 | + './config/**/*.js', |
| 36 | + './tests/dummy/config/**/*.js', |
42 | 37 | ],
|
43 | 38 | parserOptions: {
|
44 | 39 | sourceType: 'script',
|
45 |
| - ecmaVersion: 2015 |
46 | 40 | },
|
47 | 41 | env: {
|
48 | 42 | browser: false,
|
49 |
| - node: true |
| 43 | + node: true, |
50 | 44 | },
|
51 | 45 | plugins: ['node'],
|
52 |
| - rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { |
53 |
| - // add your custom rules and overrides for node files here |
54 |
| - }) |
55 |
| - } |
56 |
| - ] |
| 46 | + extends: ['plugin:node/recommended'], |
| 47 | + }, |
| 48 | + { |
| 49 | + // Test files: |
| 50 | + files: ['tests/**/*-test.{js,ts}'], |
| 51 | + extends: ['plugin:qunit/recommended'], |
| 52 | + }, |
| 53 | + ], |
57 | 54 | };
|
0 commit comments