Skip to content

Commit 8a14562

Browse files
committed
Merge branch 'release/21.6.0'
2 parents 7a3bc8d + 666595d commit 8a14562

File tree

849 files changed

+10165
-14360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

849 files changed

+10165
-14360
lines changed

.eslintignore

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
1-
!.eslintrc.js
2-
!.template-lintrc.js
3-
/coverage/**
4-
/dist/**
5-
/docs/**
6-
/tmp/**
7-
/vendor/**
8-
/blueprints/*/files/**
9-
/blueprints/*/engine-files/**
1+
# unconventional js
2+
/blueprints/*/files/
3+
/blueprints/*/engine-files/
4+
/node-tests/fixtures/blueprints/
5+
/vendor/
106
/config/local.js
7+
/handbook-docs/
8+
/docs/
9+
10+
# compiled output
11+
/dist/
12+
/tmp/
13+
14+
# dependencies
15+
/bower_components/
16+
/node_modules/
17+
18+
# misc
19+
/coverage/
20+
!.*
21+
.eslintcache
22+
23+
# ember-try
24+
/.node_modules.ember-try/
25+
/bower.json.ember-try
26+
/package.json.ember-try

.eslintrc.js

Lines changed: 267 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,234 @@
1-
'use strict';
2-
31
module.exports = {
42
globals: {
53
server: true,
64
},
75
root: true,
6+
env: {
7+
browser: true,
8+
es6: true,
9+
},
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:ember/recommended',
13+
'plugin:@typescript-eslint/recommended',
14+
// 'ember-concurrency', TODO: turn on ember-concurrency rules and fix errors.
15+
// 'eslint-plugin-qunit', TODO: add eslint-plugin-qunit
16+
],
817
parser: '@typescript-eslint/parser',
918
parserOptions: {
10-
ecmaVersion: 2017,
19+
ecmaVersion: 2020,
1120
sourceType: 'module',
21+
ecmaFeatures: {
22+
legacyDecorators: true,
23+
},
1224
},
13-
extends: '@centerforopenscience/eslint-config/ember',
1425
plugins: [
26+
'ember',
1527
'@typescript-eslint',
28+
'eslint-plugin-import',
1629
],
17-
env: {
18-
browser: true,
19-
es6: true,
20-
},
2130
rules: {
22-
'arrow-parens': ['error', 'as-needed'],
23-
'class-methods-use-this': 'off',
31+
'@typescript-eslint/array-type': [
32+
'error',
33+
{
34+
default: 'array-simple',
35+
},
36+
],
37+
'@typescript-eslint/consistent-type-assertions': 'error',
38+
'@typescript-eslint/consistent-type-definitions': 'error',
39+
'@typescript-eslint/member-delimiter-style': [
40+
'error',
41+
{
42+
overrides: {
43+
interface: {
44+
multiline: {
45+
delimiter: 'semi',
46+
requireLast: true,
47+
},
48+
singleline: {
49+
delimiter: 'semi',
50+
requireLast: false,
51+
},
52+
},
53+
typeLiteral: {
54+
multiline: {
55+
delimiter: 'comma',
56+
requireLast: true,
57+
},
58+
singleline: {
59+
delimiter: 'comma',
60+
requireLast: false,
61+
},
62+
},
63+
},
64+
},
65+
],
66+
'@typescript-eslint/ban-ts-comment': [
67+
'error',
68+
{
69+
'ts-ignore': 'allow-with-description',
70+
},
71+
],
72+
'@typescript-eslint/no-shadow': [
73+
'error',
74+
{
75+
hoist: 'all',
76+
},
77+
],
78+
'@typescript-eslint/no-unused-expressions': 'error',
79+
'@typescript-eslint/no-empty-function': 'error',
80+
'@typescript-eslint/prefer-for-of': 'error',
81+
'@typescript-eslint/prefer-function-type': 'error',
82+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
83+
'@typescript-eslint/quotes': [
84+
'error',
85+
'single',
86+
{
87+
avoidEscape: true,
88+
},
89+
],
90+
'@typescript-eslint/semi': [
91+
'error',
92+
'always',
93+
],
94+
'@typescript-eslint/triple-slash-reference': [
95+
'error',
96+
{
97+
path: 'always',
98+
types: 'prefer-import',
99+
lib: 'always',
100+
},
101+
],
102+
'@typescript-eslint/unified-signatures': 'error',
103+
'@typescript-eslint/explicit-member-accessibility': 'off',
104+
'@typescript-eslint/ban-types': 'off',
105+
'@typescript-eslint/indent': [
106+
'off', // currently broken: https://github.com/typescript-eslint/typescript-eslint/issues/1824
107+
4,
108+
{
109+
FunctionDeclaration: {
110+
parameters: 'first',
111+
},
112+
FunctionExpression: {
113+
parameters: 'first',
114+
},
115+
},
116+
],
117+
'@typescript-eslint/no-non-null-assertion': 'off',
118+
'@typescript-eslint/member-ordering': 'off',
119+
'@typescript-eslint/naming-convention': 'off',
120+
'@typescript-eslint/no-explicit-any': 'off',
121+
'@typescript-eslint/no-parameter-properties': 'off',
122+
'@typescript-eslint/no-use-before-define': 'off',
123+
'@typescript-eslint/prefer-optional-chain': 'off',
124+
'@typescript-eslint/interface-name-prefix': 'off',
125+
'@typescript-eslint/explicit-function-return-type': 'off',
126+
'@typescript-eslint/explicit-module-boundary-types': 'off',
127+
// ember
128+
'ember/new-module-imports': 'error',
129+
'ember/no-attrs-in-components': 'error',
130+
'ember/no-old-shims': 'error',
131+
'ember/no-private-routing-service': 'error',
132+
'ember/use-ember-data-rfc-395-imports': 'off',
133+
'ember/no-test-support-import': 'off',
134+
'ember/no-jquery': 'off',
135+
'ember/named-functions-in-promises': 'off',
136+
'ember/routes-segments-snake-case': 'off',
137+
'ember/no-classic-components': 'off',
138+
'ember/require-tagless-components': 'off',
139+
'ember/require-super-in-lifecycle-hooks': 'off',
140+
'ember/no-component-lifecycle-hooks': 'off',
141+
'ember/no-computed-properties-in-native-classes': 'off',
142+
'ember/classic-decorator-hooks': 'off',
143+
'ember/classic-decorator-no-classic-methods': 'off',
144+
'ember/no-classic-classes': 'off',
145+
'ember/no-get': 'off',
146+
'ember/no-controller-access-in-routes': 'off',
147+
'ember/no-assignment-of-untracked-properties-used-in-tracking-contexts': 'off',
148+
// ember-concurrency
149+
'ember-concurrency/no-perform-without-catch': 'off',
150+
'ember-concurrency/require-task-name-suffix': 'off',
151+
'ember-concurrency/no-native-promise-helpers': 'off',
152+
'arrow-body-style': 'error',
153+
'arrow-parens': [
154+
'error',
155+
'as-needed',
156+
],
157+
'brace-style': [
158+
'error',
159+
'1tbs',
160+
],
161+
'comma-dangle': [
162+
'error',
163+
'always-multiline',
164+
],
165+
'constructor-super': 'error',
166+
curly: 'error',
167+
'eol-last': 'error',
168+
eqeqeq: [
169+
'error',
170+
'smart',
171+
],
172+
'guard-for-in': 'error',
173+
'id-denylist': [
174+
'error',
175+
'any',
176+
'Number',
177+
'number',
178+
'String',
179+
'string',
180+
'Boolean',
181+
'boolean',
182+
'Undefined',
183+
'undefined',
184+
],
185+
'id-match': 'error',
186+
'import/order': 'error',
24187
'max-len': ['error', { code: 120 }],
25-
strict: 'off',
188+
'new-parens': 'error',
189+
'no-bitwise': 'error',
190+
'no-caller': 'error',
191+
'no-cond-assign': 'error',
192+
'no-console': 'error',
193+
'no-debugger': 'error',
194+
'no-empty': 'error',
195+
'no-eval': 'error',
196+
'no-multiple-empty-lines': 'error',
197+
'no-new-wrappers': 'error',
198+
'no-throw-literal': 'error',
199+
'no-trailing-spaces': 'error',
200+
'no-undef-init': 'error',
201+
'no-unsafe-finally': 'error',
202+
'no-unused-labels': 'error',
203+
'no-var': 'error',
204+
'object-shorthand': 'error',
205+
'one-var': [
206+
'error',
207+
'never',
208+
],
209+
'prefer-const': 'error',
210+
'quote-props': [
211+
'error',
212+
'as-needed',
213+
],
214+
radix: 'error',
215+
'spaced-comment': [
216+
'error',
217+
'always',
218+
{
219+
markers: [
220+
'/',
221+
],
222+
},
223+
],
224+
'use-isnan': 'error',
225+
'max-classes-per-file': 'off',
226+
complexity: 'off',
227+
'no-fallthrough': 'off',
228+
'no-invalid-this': 'off',
229+
'valid-typeof': 'off',
230+
// old rules
231+
indent: ['error', 4],
26232
'function-paren-newline': ['error', 'consistent'],
27233
'prefer-rest-params': 'error',
28234
'generator-star-spacing': ['error', 'before'],
@@ -32,29 +238,25 @@ module.exports = {
32238
ImportDeclaration: { multiline: true, consistent: true },
33239
ExportDeclaration: { multiline: true, consistent: true },
34240
}],
35-
'ember/named-functions-in-promises': 'off',
36-
'ember/new-module-imports': 'error',
37-
'ember/no-attrs-in-components': 'error',
38-
'ember/no-old-shims': 'error',
39-
'ember/routes-segments-snake-case': 'off',
40-
'import/export': 'off',
41-
'import/prefer-default-export': 'off',
42-
'no-restricted-globals': 'off',
43241
'space-before-function-paren': ['error', {
44242
anonymous: 'never',
45243
named: 'never',
46244
asyncArrow: 'always',
47245
}],
48-
'no-underscore-dangle': 'off',
49246
'linebreak-style': ['error', (process.platform === 'win32' ? 'windows' : 'unix')],
247+
strict: 'off',
248+
'class-methods-use-this': 'off',
249+
'import/export': 'off',
250+
'import/prefer-default-export': 'off',
251+
'no-restricted-globals': 'off',
252+
'no-underscore-dangle': 'off',
50253
'lines-between-class-members': 'off',
51254
},
52255
overrides: [
53256
{
54257
files: ['**/config/environment.d.ts'],
55258
rules: {
56259
indent: 'off',
57-
'indent-legacy': 'error',
58260
},
59261
},
60262
{
@@ -71,7 +273,11 @@ module.exports = {
71273
rules: {
72274
'no-useless-constructor': 'off',
73275
'space-infix-ops': 'off',
74-
'no-shadow': 'off',
276+
'max-len': 'off',
277+
'@typescript-eslint/no-unused-vars': 'off',
278+
'@typescript-eslint/member-delimiter-style': 'off',
279+
'@typescript-eslint/member-ordering': 'off',
280+
'@typescript-eslint/no-shadow': 'off',
75281
},
76282
},
77283
{
@@ -98,6 +304,7 @@ module.exports = {
98304
files: ['lib/*/index.js'],
99305
rules: {
100306
'ember/avoid-leaking-state-in-ember-objects': 'off',
307+
'@typescript-eslint/no-var-requires': 'off',
101308
},
102309
},
103310
{
@@ -106,6 +313,44 @@ module.exports = {
106313
'ember/avoid-leaking-state-in-ember-objects': 'off',
107314
},
108315
},
316+
{
317+
files: [
318+
'.eslintrc.js',
319+
'.prettierrc.js',
320+
'.template-lintrc.js',
321+
'ember-cli-build.js',
322+
'testem.js',
323+
'run-node-test.js',
324+
'lib/**/environment.js',
325+
'lib/**/index.js',
326+
'blueprints/*/index.js',
327+
'blueprints/**/*.js',
328+
'node-tests/**/*.js',
329+
'config/**/*.js',
330+
],
331+
parserOptions: {
332+
sourceType: 'script',
333+
ecmaVersion: 2018,
334+
},
335+
env: {
336+
browser: false,
337+
node: true,
338+
},
339+
plugins: ['node'],
340+
extends: ['plugin:node/recommended'],
341+
rules: {
342+
'no-undef': 'off',
343+
'id-denylist': 'off',
344+
'node/no-unpublished-require': 'off',
345+
'node/no-extraneous-require': 'off',
346+
'node/no-unsupported-features/es-syntax': 'off',
347+
'node/no-missing-import': 'off',
348+
'ember/no-string-prototype-extensions': 'off',
349+
'ember/no-classic-classes': 'off',
350+
'@typescript-eslint/no-var-requires': 'off',
351+
'@typescript-eslint/no-unused-vars': 'off',
352+
},
353+
},
109354
],
110355
settings: {
111356
'import/extensions': ['error', 'never'],

0 commit comments

Comments
 (0)