|
| 1 | +'use strict'; |
| 2 | + |
1 | 3 | module.exports = { |
2 | | - root : true, |
3 | | - parser : 'babel-eslint', |
4 | | - parserOptions : { |
5 | | - ecmaVersion : 2018, |
6 | | - sourceType : 'module', |
7 | | - ecmaFeatures : { |
8 | | - legacyDecorators : true, |
9 | | - }, |
| 4 | + root: true, |
| 5 | + parser: '@typescript-eslint/parser', |
| 6 | + parserOptions: { |
| 7 | + ecmaVersion: 'latest', |
10 | 8 | }, |
11 | | - plugins : [ |
12 | | - 'align-assignments', |
13 | | - 'ember', |
14 | | - 'varspacing', |
15 | | - ], |
16 | | - extends : [ |
| 9 | + plugins: ['ember', '@typescript-eslint'], |
| 10 | + extends: [ |
17 | 11 | 'eslint:recommended', |
18 | 12 | 'plugin:ember/recommended', |
19 | | - 'standard', |
20 | | - 'plugin:varspacing/recommended', |
| 13 | + 'plugin:prettier/recommended', |
21 | 14 | ], |
22 | | - env : { |
23 | | - browser : true, |
| 15 | + env: { |
| 16 | + browser: true, |
24 | 17 | }, |
25 | | - rules : { |
26 | | - 'align-assignments/align-assignments' : 'error', |
27 | | - 'arrow-parens' : 'off', |
28 | | - 'camelcase' : 'off', |
29 | | - 'comma-dangle' : ['error', 'always-multiline'], |
30 | | - 'ember/no-jquery' : 'error', |
31 | | - 'ember/no-observers' : 'off', |
32 | | - 'func-call-spacing' : 'off', |
33 | | - 'generator-star-spacing' : 'off', |
34 | | - 'indent' : ['error', 2, {flatTernaryExpressions : true}], |
35 | | - 'key-spacing' : ['error', { beforeColon : true, afterColon : true, align : 'colon' }], |
36 | | - 'new-cap' : 'off', |
37 | | - 'no-console' : 'off', |
38 | | - 'no-mixed-operators' : 'off', |
39 | | - 'no-multi-spaces' : 'off', |
40 | | - 'no-multiple-empty-lines' : 'off', |
41 | | - 'no-return-assign' : 'off', |
42 | | - 'no-sequences' : 'off', |
43 | | - 'no-template-curly-in-string' : 'off', |
44 | | - 'no-whitespace-before-property' : 'off', |
45 | | - 'object-curly-spacing' : 'off', |
46 | | - 'operator-linebreak' : 'off', |
47 | | - 'padded-blocks' : 'off', |
48 | | - 'quote-props' : ['error', 'consistent-as-needed'], |
49 | | - 'quotes' : ['error', 'single'], |
50 | | - 'spaced-comment' : 'off', |
51 | | - 'standard/object-curly-even-spacing' : 'off', |
52 | | - }, |
53 | | - overrides : [ |
54 | | - // node files |
| 18 | + rules: {}, |
| 19 | + overrides: [ |
| 20 | + // ts files |
55 | 21 | { |
56 | | - files : [ |
57 | | - '.eslintrc.js', |
58 | | - '.template-lintrc.js', |
59 | | - 'ember-cli-build.js', |
60 | | - 'index.js', |
61 | | - 'testem.js', |
62 | | - 'blueprints/*/index.js', |
63 | | - 'config/**/*.js', |
64 | | - 'tests/dummy/config/**/*.js', |
65 | | - ], |
66 | | - excludedFiles : [ |
67 | | - 'addon/**', |
68 | | - 'addon-test-support/**', |
69 | | - 'app/**', |
70 | | - 'tests/dummy/app/**', |
71 | | - 'tests/pages/**', |
| 22 | + files: ['**/*.ts'], |
| 23 | + extends: [ |
| 24 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 25 | + 'plugin:@typescript-eslint/recommended', |
72 | 26 | ], |
73 | | - parserOptions : { |
74 | | - sourceType : 'script', |
75 | | - ecmaVersion : 2015, |
76 | | - }, |
77 | | - env : { |
78 | | - browser : false, |
79 | | - node : true, |
80 | | - }, |
81 | | - plugins : ['node'], |
82 | | - rules : Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, { |
83 | | - // add your custom rules and overrides for node files here |
84 | | - }), |
| 27 | + rules: {}, |
85 | 28 | }, |
86 | | - |
87 | | - // tests |
| 29 | + // node files |
88 | 30 | { |
89 | | - files : [ |
90 | | - 'tests/**/*.js', |
| 31 | + files: [ |
| 32 | + './.eslintrc.js', |
| 33 | + './.prettierrc.js', |
| 34 | + './.stylelintrc.js', |
| 35 | + './.template-lintrc.js', |
| 36 | + './ember-cli-build.js', |
| 37 | + './index.js', |
| 38 | + './testem.js', |
| 39 | + './blueprints/*/index.js', |
| 40 | + './config/**/*.js', |
| 41 | + './tests/dummy/config/**/*.js', |
91 | 42 | ], |
92 | | - rules : { |
93 | | - 'no-unused-expressions' : 'off', |
| 43 | + env: { |
| 44 | + browser: false, |
| 45 | + node: true, |
94 | 46 | }, |
| 47 | + extends: ['plugin:n/recommended'], |
| 48 | + }, |
| 49 | + { |
| 50 | + // test files |
| 51 | + files: ['tests/**/*-test.{js,ts}'], |
| 52 | + extends: ['plugin:qunit/recommended'], |
95 | 53 | }, |
96 | 54 | ], |
97 | | -} |
| 55 | +}; |
0 commit comments