Skip to content

Commit 91fc538

Browse files
committed
Update ESLint
1 parent 9774499 commit 91fc538

File tree

2 files changed

+215
-7
lines changed

2 files changed

+215
-7
lines changed

.github/workflows/ci-jobs.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: ./.github/actions/setup
18-
# Temporarily disabled to see the later parts of CI
19-
# - name: linting
20-
# run: pnpm lint
18+
- name: linting
19+
run: pnpm lint
2120
- id: set-matrix
2221
working-directory: smoke-tests/scenarios
2322
run: |
@@ -40,10 +39,10 @@ jobs:
4039
types-range:
4140
name: Type Checking (other supported versions)
4241
runs-on: ubuntu-latest
43-
needs: [ 'types' ]
42+
needs: ["types"]
4443
strategy:
4544
matrix:
46-
ts-version: [ '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ]
45+
ts-version: ["5.2", "5.3", "5.4", "5.5", "5.6", "5.7", "5.8", "5.9"]
4746
steps:
4847
- uses: actions/checkout@v4
4948
- uses: ./.github/actions/setup
@@ -70,7 +69,7 @@ jobs:
7069
variant-tests:
7170
name: ${{ matrix.name }}
7271
runs-on: ubuntu-latest
73-
needs: [ basic-test, lint, types ]
72+
needs: [basic-test, lint, types]
7473
strategy:
7574
fail-fast: false
7675
matrix:
@@ -110,7 +109,7 @@ jobs:
110109
browserstack-test:
111110
name: Browserstack Tests (Safari, Edge)
112111
runs-on: ubuntu-latest
113-
needs: [ basic-test, lint, types ]
112+
needs: [basic-test, lint, types]
114113
steps:
115114
- uses: actions/checkout@v4
116115
- uses: ./.github/actions/setup

eslint.config.mjs

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export default [
2828
'glimmer-vm/repo-metadata/',
2929
'glimmer-vm/**/rollup.config.mjs',
3030
'glimmer-vm/packages/@glimmer/vm-babel-plugins/',
31+
'glimmer-vm/bin/**',
32+
'glimmer-vm/guides/**',
33+
'glimmer-vm/benchmark/**',
34+
'glimmer-vm/*.{js,ts}',
35+
'packages/@glimmer-workspace/**',
3136
],
3237
},
3338
pluginJs.configs.recommended,
@@ -286,4 +291,208 @@ export default [
286291
},
287292
},
288293
},
294+
295+
...tseslint.configs.recommendedTypeChecked.map((config) => {
296+
return {
297+
...config,
298+
files: ['packages/@glimmer/**/*.ts'],
299+
};
300+
}),
301+
{
302+
files: ['packages/@glimmer/**/*.{ts,js}'],
303+
rules: {
304+
'ember-internal/require-yuidoc-access': 'off',
305+
'ember-internal/no-const-outside-module-scope': 'off',
306+
},
307+
},
308+
{
309+
files: ['packages/@glimmer/**/*.ts'],
310+
rules: {
311+
'prefer-const': 'off',
312+
'qunit/no-conditional-assertions': 'off',
313+
'disable-features/disable-generator-functions': 'off',
314+
'@typescript-eslint/no-deprecated': 'error',
315+
'@typescript-eslint/no-floating-promises': 'error',
316+
'@typescript-eslint/restrict-template-expressions': 'off',
317+
'@typescript-eslint/restrict-plus-operands': 'error',
318+
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
319+
'@typescript-eslint/naming-convention': 'error',
320+
'@typescript-eslint/no-non-null-assertion': 'error',
321+
'@typescript-eslint/no-confusing-void-expression': 'error',
322+
'@typescript-eslint/no-unsafe-argument': 'error',
323+
'@typescript-eslint/no-unnecessary-condition': 'error',
324+
},
325+
},
326+
{
327+
files: ['packages/@glimmer/constants/**/*.ts'],
328+
rules: {
329+
'@typescript-eslint/naming-convention': 'off',
330+
},
331+
},
332+
{
333+
files: ['packages/@glimmer/global-context/**/*.ts'],
334+
rules: {
335+
'@typescript-eslint/naming-convention': 'off',
336+
'@typescript-eslint/no-unnecessary-condition': 'off',
337+
},
338+
},
339+
{
340+
files: ['packages/@glimmer/component/**/*.ts'],
341+
rules: {
342+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
343+
'@typescript-eslint/no-explicit-any': 'off',
344+
'@typescript-eslint/naming-convention': 'off',
345+
'@typescript-eslint/no-unnecessary-condition': 'off',
346+
'@typescript-eslint/unbound-method': 'off',
347+
},
348+
},
349+
{
350+
files: ['packages/@glimmer/debug/**/*.ts'],
351+
rules: {
352+
'no-fallthrough': 'off',
353+
'no-implicit-coercion': 'off',
354+
'@typescript-eslint/naming-convention': 'off',
355+
'@typescript-eslint/no-unused-vars': 'off',
356+
'@typescript-eslint/no-confusing-void-expression': 'off',
357+
},
358+
},
359+
{
360+
files: ['packages/@glimmer/debug-util/**/*.ts'],
361+
rules: {
362+
'@typescript-eslint/no-unnecessary-condition': 'off',
363+
'@typescript-eslint/naming-convention': 'off',
364+
'@typescript-eslint/no-extraneous-class': 'off',
365+
},
366+
},
367+
{
368+
files: ['packages/@glimmer/local-debug-flags/**/*.ts'],
369+
rules: {
370+
'no-implicit-coercion': 'off',
371+
'@typescript-eslint/naming-convention': 'off',
372+
'@typescript-eslint/no-unnecessary-condition': 'off',
373+
},
374+
},
375+
{
376+
files: ['packages/@glimmer/interfaces/**/*.ts'],
377+
rules: {
378+
'import/export': 'off',
379+
'@typescript-eslint/naming-convention': 'off',
380+
},
381+
},
382+
{
383+
files: ['packages/@glimmer/encoder/**/*.ts'],
384+
rules: {
385+
'@typescript-eslint/no-unnecessary-condition': 'off',
386+
},
387+
},
388+
{
389+
files: ['packages/@glimmer/vm/**/*.ts'],
390+
rules: {
391+
'@typescript-eslint/naming-convention': 'off',
392+
},
393+
},
394+
{
395+
files: ['packages/@glimmer/compiler/**/*.ts'],
396+
rules: {
397+
'no-implicit-coercion': 'off',
398+
'@typescript-eslint/no-unused-vars': 'off',
399+
'@typescript-eslint/naming-convention': 'off',
400+
'@typescript-eslint/no-unsafe-member-access': 'off',
401+
'@typescript-eslint/no-explicit-any': 'off',
402+
},
403+
},
404+
{
405+
files: ['packages/@glimmer/opcode-compiler/**/*.ts'],
406+
rules: {
407+
'@typescript-eslint/no-confusing-void-expression': 'off',
408+
'@typescript-eslint/no-unnecessary-condition': 'off',
409+
'@typescript-eslint/naming-convention': 'off',
410+
},
411+
},
412+
{
413+
files: ['packages/@glimmer/destroyable/**/*.ts'],
414+
rules: {
415+
'@typescript-eslint/no-unnecessary-condition': 'off',
416+
},
417+
},
418+
{
419+
files: ['packages/@glimmer/reference/**/*.ts'],
420+
rules: {
421+
'@typescript-eslint/no-confusing-void-expression': 'off',
422+
'@typescript-eslint/no-unnecessary-condition': 'off',
423+
},
424+
},
425+
{
426+
files: ['packages/@glimmer/manager/**/*.ts'],
427+
rules: {
428+
'no-implicit-coercion': 'off',
429+
'@typescript-eslint/no-unnecessary-condition': 'off',
430+
'@typescript-eslint/no-confusing-void-expression': 'off',
431+
},
432+
},
433+
{
434+
files: ['packages/@glimmer/node/**/*.ts'],
435+
rules: {
436+
'@typescript-eslint/naming-convention': 'off',
437+
},
438+
},
439+
{
440+
files: ['packages/@glimmer/runtime/**/*.ts'],
441+
rules: {
442+
'no-implicit-coercion': 'off',
443+
'@typescript-eslint/naming-convention': 'off',
444+
'@typescript-eslint/no-confusing-void-expression': 'off',
445+
'@typescript-eslint/no-unnecessary-condition': 'off',
446+
},
447+
},
448+
{
449+
files: ['packages/@glimmer/validator/**/*.ts'],
450+
rules: {
451+
'@typescript-eslint/no-deprecated': 'off',
452+
'@typescript-eslint/no-unnecessary-condition': 'off',
453+
'@typescript-eslint/no-confusing-void-expression': 'off',
454+
},
455+
},
456+
{
457+
files: ['packages/@glimmer/syntax/**/*.ts'],
458+
rules: {
459+
'@typescript-eslint/no-confusing-void-expression': 'off',
460+
'@typescript-eslint/naming-convention': 'off',
461+
'@typescript-eslint/no-unsafe-argument': 'off',
462+
'@typescript-eslint/no-unsafe-assignment': 'off',
463+
'@typescript-eslint/no-unsafe-return': 'off',
464+
'@typescript-eslint/no-unsafe-member-access': 'off',
465+
'@typescript-eslint/no-unsafe-function-type': 'off',
466+
'@typescript-eslint/no-unsafe-call': 'off',
467+
},
468+
},
469+
{
470+
files: ['packages/@glimmer/wire-format/**/*.ts'],
471+
rules: {
472+
'@typescript-eslint/naming-convention': 'off',
473+
'@typescript-eslint/no-unsafe-argument': 'off',
474+
'@typescript-eslint/no-unsafe-assignment': 'off',
475+
'@typescript-eslint/no-unsafe-return': 'off',
476+
'@typescript-eslint/no-unsafe-member-access': 'off',
477+
'@typescript-eslint/no-unsafe-function-type': 'off',
478+
'@typescript-eslint/no-unsafe-call': 'off',
479+
},
480+
},
481+
{
482+
files: ['packages/@glimmer/**/test/**/*.ts'],
483+
rules: {
484+
'@typescript-eslint/no-unused-vars': 'off',
485+
'@typescript-eslint/no-explicit-any': 'off',
486+
'@typescript-eslint/no-unsafe-argument': 'off',
487+
'@typescript-eslint/no-unsafe-assignment': 'off',
488+
'@typescript-eslint/no-unsafe-return': 'off',
489+
'@typescript-eslint/no-unsafe-member-access': 'off',
490+
'@typescript-eslint/no-unsafe-function-type': 'off',
491+
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
492+
'@typescript-eslint/no-unsafe-call': 'off',
493+
'@typescript-eslint/restrict-template-expressions': 'off',
494+
'@typescript-eslint/no-confusing-void-expression': 'off',
495+
'@typescript-eslint/naming-convention': 'off',
496+
},
497+
},
289498
];

0 commit comments

Comments
 (0)