-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: upgrade `eslint` to 9.16.0 * build: upgrade `eslint-plugin-ember` to 12.3.3 * build: upgrade `eslint-plugin-n` to 17.14.0 * build: upgrade `eslint-plugin-qunit` to 8.1.2 * chore: run `npx @eslint/migrate-config` Command executed: ``` npx @eslint/migrate-config .eslintrc.js ``` * build: add `globals@15.12.0` * build: add `@eslint/js@9.16.0` * build: add `@eslint/eslintrc@3.2.0` * build: add `typescript-eslint@8.16.0` https://typescript-eslint.io/packages/typescript-eslint/ * build: deduplicate lockfile Commands executed: 1. `npx yarn-deduplicate` 2. `yarn` * refactor: run lint auto-fix * refactor: rename imported symbols * chore: delete legacy files from ESLint before v9 * chore: fix relative file paths Looks like a bug: eslint/eslint#18757 * chore: add `.mjs` files to Prettier * refactor: make use of helper `tseslint.config()` https://typescript-eslint.io/packages/typescript-eslint/#config * refactor: use flat configs of plugins applied globally * refactor: merge configs for `eslint-plugin-n` * refactor: use flat config of `eslint-plugin-n` * refactor: use flat config of `eslint-plugin-qunit` * refactor: merge configs for `@typescript-eslint` * refactor: restore comment for rules `@typescript-eslint` * refactor: use flat config of `@typescript-eslint` * refactor: remove unused `FlatCompat`
- Loading branch information
Showing
7 changed files
with
446 additions
and
632 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
/.ember-cli | ||
/.env* | ||
/.eslintcache | ||
/.eslintignore | ||
/.eslintrc.js | ||
/.git/ | ||
/.github/ | ||
/.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
import globals from 'globals' | ||
import tseslint from 'typescript-eslint' | ||
|
||
import pluginEmber from 'eslint-plugin-ember' | ||
import pluginEmberRecommended from 'eslint-plugin-ember/configs/recommended' | ||
import pluginEslintJs from '@eslint/js' | ||
import pluginNode from 'eslint-plugin-n' | ||
import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended' | ||
import pluginQunitRecommended from 'eslint-plugin-qunit/configs/recommended' | ||
|
||
export default tseslint.config( | ||
pluginEslintJs.configs.recommended, | ||
// @ts-expect-error: See https://github.com/ember-tooling/ember-eslint-parser/issues/113 | ||
...pluginEmberRecommended, | ||
pluginPrettierRecommended, | ||
|
||
{ | ||
ignores: [ | ||
// Unconventional js | ||
'blueprints/*/files/', | ||
|
||
// Compiled output | ||
'dist/', | ||
|
||
// Misc | ||
'coverage/', | ||
'!**/.*', | ||
'**/.*/', | ||
|
||
// ember -try | ||
'.node_modules.ember-try/', | ||
'npm-shrinkwrap.json.ember-try', | ||
'package.json.ember-try', | ||
'package-lock.json.ember-try', | ||
'yarn.lock.ember-try', | ||
], | ||
}, | ||
{ | ||
plugins: { | ||
ember: pluginEmber, | ||
'@typescript-eslint': tseslint.plugin, | ||
}, | ||
|
||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
}, | ||
|
||
parser: tseslint.parser, | ||
ecmaVersion: 'latest', | ||
sourceType: 'script', | ||
}, | ||
|
||
rules: { | ||
'@typescript-eslint/ban-ts-comment': [ | ||
'error', | ||
{ | ||
'ts-check': 'allow-with-description', | ||
'ts-expect-error': 'allow-with-description', | ||
'ts-ignore': 'allow-with-description', | ||
'ts-nocheck': 'allow-with-description', | ||
/** | ||
* Count 2 characters for `: ` when giving a description. | ||
* | ||
* @ts-nocheck: a | ||
* ^^^--- Description of 3 characters | ||
* | ||
* @ts-nocheck: abc | ||
* ^^^^^--- Description of 5 characters | ||
*/ | ||
minimumDescriptionLength: 7, // minimum of 2 + 5 | ||
}, | ||
], | ||
|
||
// This rule is overriden and configured in the `overrides` Array below | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
|
||
'no-empty-function': 'off', | ||
'@typescript-eslint/no-empty-function': ['error'], | ||
}, | ||
}, | ||
{ | ||
// Config for Typescript files | ||
|
||
extends: [tseslint.configs.recommended], | ||
|
||
files: ['**/*.ts'], | ||
|
||
rules: { | ||
'@typescript-eslint/explicit-module-boundary-types': ['error'], | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'no-undef': 'off', | ||
'no-unused-vars': 'off', | ||
}, | ||
}, | ||
{ | ||
// Config for Node files | ||
|
||
...pluginNode.configs['flat/recommended-script'], | ||
|
||
files: [ | ||
'.prettierrc.js', | ||
'.stylelintrc.js', | ||
'.template-lintrc.js', | ||
'ember-cli-build.js', | ||
'eslint.config.mjs', | ||
'index.js', | ||
'testem.js', | ||
'blueprints/*/index.js', | ||
'config/**/*.js', | ||
'tests/dummy/config/**/*.js', | ||
], | ||
|
||
languageOptions: { | ||
globals: { | ||
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, 'off'])), | ||
...globals.node, | ||
}, | ||
}, | ||
}, | ||
{ | ||
// Config for test files | ||
|
||
...pluginQunitRecommended, | ||
files: ['tests/**/*-test.{js,ts}'], | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.