From 7f3d22121d38c26f07dd09c6728c0031d0de0442 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Tue, 1 Sep 2026 11:39:37 -0500 Subject: [PATCH 1/7] feat!: support ESLint 9 and 10 --- README.md | 47 ++++++++++++++++++++++++++------- index.js | 48 +++++++++++++++++++--------------- package.json | 13 +++++----- recommended.js | 70 ++++++++++++++++++++++++++------------------------ 4 files changed, 108 insertions(+), 70 deletions(-) diff --git a/README.md b/README.md index d556dea..399aad9 100644 --- a/README.md +++ b/README.md @@ -4,36 +4,47 @@ Shared ESLint config used in Ionic and Capacitor projects. This is meant to be used alongside Prettier (with [`@ionic/prettier-config`](https://github.com/ionic-team/prettier-config/)). +> **v1.0.0 requires ESLint 9 or 10** and a flat config file. Staying on ESLint 8? Keep using +> `@ionic/eslint-config@0.4.0`. + ## Usage -1. Remove existing `.eslintrc.*` file, if present. -1. Install `eslint` and the config. +1. Install `eslint` and the config: ``` npm install -D eslint @ionic/eslint-config ``` -1. Add the following to `package.json`: +1. Create an `eslint.config.cjs` in your project root: + ```js + const ionic = require('@ionic/eslint-config/recommended'); + + module.exports = [ + { ignores: ['dist/**', 'build/**'] }, + ...ionic, + ]; ``` - "eslintConfig": { - "extends": "@ionic/eslint-config/recommended" - } - ``` + + From an ESM config (`eslint.config.mjs`), import `'@ionic/eslint-config/recommended.js'`. :memo: You can also use the base rule set: `@ionic/eslint-config` +Both rule sets apply only to TypeScript files (`.ts`, `.tsx`, `.mts`, `.cts`), matching the +`eslint --ext ts` usage 0.x was paired with. To lint JavaScript too, add your own config block. + ### With Prettier and `@ionic/prettier-config` 1. Set up Prettier and [`@ionic/prettier-config`](https://github.com/ionic-team/prettier-config/). -1. When using with Prettier and `@ionic/prettier-config`, ESLint should run first. Set up your scripts in `package.json` like this: +1. This config already includes `eslint-config-prettier`, so formatting rules that would + fight Prettier are turned off. Run Prettier as its own step, with ESLint first: ```json "scripts": { "lint": "npm run eslint && npm run prettier -- --check", "fmt": "npm run eslint -- --fix && npm run prettier -- --write", "prettier": "prettier \"**/*.ts\"", - "eslint": "eslint . --ext .ts", + "eslint": "eslint" } ``` @@ -42,6 +53,24 @@ This is meant to be used alongside Prettier (with [`@ionic/prettier-config`](htt :memo: Not every rule in this configuration is autofixable, so `npm run fmt` may continue failing until lint issues are addressed manually. +## Migrating from 0.x + +1. Delete the `eslintConfig` block from `package.json` (or any `.eslintrc` file). ESLint 10 + removed that format entirely. +1. Add an `eslint.config.cjs` as shown above. +1. Move `.eslintignore` entries into `ignores`, then delete the file. ESLint no longer reads it. +1. Drop `--ext ts` from lint scripts. Flat config ignores the flag; the config scopes itself. + +Most new reports come from the `@typescript-eslint` v5 → v8 upgrade: + +- `no-unused-vars` now flags unused `catch (e)` bindings. Use `catch {}` instead. +- `no-var-requires` was renamed to `no-require-imports`. Update any disable comments. +- `import/*` rules are now `import-x/*` ([`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x) + replaces the unmaintained `eslint-plugin-import`). Update any disable comments. +- `prefer-optional-chain` is no longer in `recommended`: it now requires + [typed linting](https://typescript-eslint.io/getting-started/typed-linting/). Re-enable it + in your own config if you use typed linting. + ### With Husky 1. Install [husky](https://github.com/typicode/husky): diff --git a/index.js b/index.js index 8912681..c8e9f32 100644 --- a/index.js +++ b/index.js @@ -1,23 +1,29 @@ -module.exports = { - parser: '@typescript-eslint/parser', - plugins: [ - '@typescript-eslint', - 'import' - ], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier', - 'plugin:import/typescript', - ], - rules: { - // https://eslint.org/docs/rules/ - 'no-fallthrough': 'off', // https://github.com/ionic-team/eslint-config/issues/7 - 'no-constant-condition': 'off', +const js = require('@eslint/js'); +const ts = require('@typescript-eslint/eslint-plugin'); +const prettier = require('eslint-config-prettier/flat'); +const importX = require('eslint-plugin-import-x'); - // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules - '@typescript-eslint/no-this-alias': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-module-boundary-types': ['warn', { 'allowArgumentsExplicitlyTypedAsAny': true }], +// Keep in sync with recommended.js. Flat config ignores `--ext` and lints .js by default, +// so scoping to TypeScript (matching 0.x's `eslint --ext ts` usage) happens here. +const TS_FILES = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']; + +module.exports = [ + js.configs.recommended, + ...ts.configs['flat/recommended'], + // Wired by hand: import-x's own TypeScript preset requires eslint-import-resolver-typescript, + // which drags in the unmaintained eslint-plugin-import and caps ESLint at v9. + { plugins: { 'import-x': importX }, settings: { 'import-x/resolver-next': [importX.createNodeResolver()] } }, + prettier, + { + rules: { + // https://eslint.org/docs/rules/ + 'no-fallthrough': 'off', // https://github.com/ionic-team/eslint-config/issues/7 + 'no-constant-condition': 'off', + + // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules + '@typescript-eslint/no-this-alias': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-module-boundary-types': ['warn', { 'allowArgumentsExplicitlyTypedAsAny': true }], + }, }, -}; \ No newline at end of file +].map((config) => (config.files ? config : { ...config, files: TS_FILES })); diff --git a/package.json b/package.json index 9e8fcf9..8304b71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/eslint-config", - "version": "0.4.0", + "version": "1.0.0", "description": "Common eslint rules/preferences for Ionic.", "main": "index.js", "repository": { @@ -21,12 +21,13 @@ }, "homepage": "https://github.com/ionic-team/eslint-config#readme", "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.58.0", - "@typescript-eslint/parser": "^5.58.0", - "eslint-config-prettier": "^8.8.0", - "eslint-plugin-import": "^2.27.0" + "@eslint/js": "^9.0.0 || ^10.0.0", + "@typescript-eslint/eslint-plugin": "^8.56.0", + "@typescript-eslint/parser": "^8.56.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-import-x": "^4.17.1" }, "peerDependencies": { - "eslint": ">=7" + "eslint": "^9.0.0 || ^10.0.0" } } diff --git a/recommended.js b/recommended.js index bb10a39..775f99d 100644 --- a/recommended.js +++ b/recommended.js @@ -1,36 +1,38 @@ -module.exports = { - extends: [ - './index', - 'plugin:import/typescript', - ], - plugins: [ - 'import', - ], - rules: { - // ./index.js - '@typescript-eslint/explicit-module-boundary-types': [ - 'error', - { allowArgumentsExplicitlyTypedAsAny: true }, - ], - // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules - '@typescript-eslint/array-type': 'error', - '@typescript-eslint/consistent-type-assertions': 'error', - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/prefer-for-of': 'error', - '@typescript-eslint/prefer-optional-chain': 'error', +const base = require('./index'); - // https://github.com/benmosher/eslint-plugin-import - 'import/first': 'error', - 'import/order': [ - 'error', - { - 'alphabetize': { order: 'asc', caseInsensitive: false }, - 'groups': [['builtin', 'external'], 'parent', ['sibling', 'index']], - 'newlines-between': 'always', - }, - ], - 'import/newline-after-import': 'error', - 'import/no-duplicates': 'error', - 'import/no-mutable-exports': 'error', +// Keep in sync with index.js. +const TS_FILES = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']; + +module.exports = [ + ...base, + { + files: TS_FILES, + rules: { + // ./index.js + '@typescript-eslint/explicit-module-boundary-types': [ + 'error', + { allowArgumentsExplicitlyTypedAsAny: true }, + ], + // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/prefer-for-of': 'error', + // prefer-optional-chain was here under v5; as of v8 it needs type information. See README. + + // https://github.com/un-ts/eslint-plugin-import-x + 'import-x/first': 'error', + 'import-x/order': [ + 'error', + { + 'alphabetize': { order: 'asc', caseInsensitive: false }, + 'groups': [['builtin', 'external'], 'parent', ['sibling', 'index']], + 'newlines-between': 'always', + }, + ], + 'import-x/newline-after-import': 'error', + 'import-x/no-duplicates': 'error', + 'import-x/no-mutable-exports': 'error', + }, }, -}; +]; From 207db90f24391e91160ac76c5aa780fe059f6495 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Tue, 1 Sep 2026 11:56:28 -0500 Subject: [PATCH 2/7] docs: trim README --- README.md | 27 ++++++++++++--------------- index.js | 7 +++---- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 399aad9..372e81b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This is meant to be used alongside Prettier (with [`@ionic/prettier-config`](htt npm install -D eslint @ionic/eslint-config ``` -1. Create an `eslint.config.cjs` in your project root: +2. Create an `eslint.config.cjs` in your project root: ```js const ionic = require('@ionic/eslint-config/recommended'); @@ -30,14 +30,13 @@ This is meant to be used alongside Prettier (with [`@ionic/prettier-config`](htt :memo: You can also use the base rule set: `@ionic/eslint-config` -Both rule sets apply only to TypeScript files (`.ts`, `.tsx`, `.mts`, `.cts`), matching the -`eslint --ext ts` usage 0.x was paired with. To lint JavaScript too, add your own config block. +Both rule sets apply only to TypeScript files (`.ts`, `.tsx`, `.mts`, `.cts`). To lint +JavaScript too, add your own config block. ### With Prettier and `@ionic/prettier-config` 1. Set up Prettier and [`@ionic/prettier-config`](https://github.com/ionic-team/prettier-config/). -1. This config already includes `eslint-config-prettier`, so formatting rules that would - fight Prettier are turned off. Run Prettier as its own step, with ESLint first: +2. When using with Prettier and `@ionic/prettier-config`, ESLint should run first. Set up your scripts in `package.json` like this: ```json "scripts": { @@ -55,19 +54,17 @@ Both rule sets apply only to TypeScript files (`.ts`, `.tsx`, `.mts`, `.cts`), m ## Migrating from 0.x -1. Delete the `eslintConfig` block from `package.json` (or any `.eslintrc` file). ESLint 10 - removed that format entirely. -1. Add an `eslint.config.cjs` as shown above. -1. Move `.eslintignore` entries into `ignores`, then delete the file. ESLint no longer reads it. -1. Drop `--ext ts` from lint scripts. Flat config ignores the flag; the config scopes itself. +1. Delete the `eslintConfig` block from `package.json` (or any `.eslintrc` file). +2. Add an `eslint.config.cjs` as shown above. +3. Move `.eslintignore` entries into `ignores`, then delete the file. +4. Drop `--ext ts` from lint scripts; flat config ignores the flag. -Most new reports come from the `@typescript-eslint` v5 → v8 upgrade: +New reports to expect: - `no-unused-vars` now flags unused `catch (e)` bindings. Use `catch {}` instead. - `no-var-requires` was renamed to `no-require-imports`. Update any disable comments. -- `import/*` rules are now `import-x/*` ([`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x) - replaces the unmaintained `eslint-plugin-import`). Update any disable comments. -- `prefer-optional-chain` is no longer in `recommended`: it now requires +- `import/*` rules are now [`import-x/*`](https://github.com/un-ts/eslint-plugin-import-x). Update any disable comments. +- `prefer-optional-chain` is no longer in `recommended`; it now requires [typed linting](https://typescript-eslint.io/getting-started/typed-linting/). Re-enable it in your own config if you use typed linting. @@ -79,7 +76,7 @@ Most new reports come from the `@typescript-eslint` v5 → v8 upgrade: npm install -D husky ``` -1. Add the following to `package.json`: +2. Add the following to `package.json`: ``` "husky": { diff --git a/index.js b/index.js index c8e9f32..a46cc29 100644 --- a/index.js +++ b/index.js @@ -3,15 +3,14 @@ const ts = require('@typescript-eslint/eslint-plugin'); const prettier = require('eslint-config-prettier/flat'); const importX = require('eslint-plugin-import-x'); -// Keep in sync with recommended.js. Flat config ignores `--ext` and lints .js by default, -// so scoping to TypeScript (matching 0.x's `eslint --ext ts` usage) happens here. +// Flat config ignores `--ext`, so the TypeScript scoping happens here. Keep in sync with recommended.js. const TS_FILES = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']; module.exports = [ js.configs.recommended, ...ts.configs['flat/recommended'], - // Wired by hand: import-x's own TypeScript preset requires eslint-import-resolver-typescript, - // which drags in the unmaintained eslint-plugin-import and caps ESLint at v9. + // import-x's own TypeScript preset needs a resolver package whose peers cap ESLint at v9, + // so use the resolver import-x bundles instead. { plugins: { 'import-x': importX }, settings: { 'import-x/resolver-next': [importX.createNodeResolver()] } }, prettier, { From 61966559d233c0bf280c98d6de1fc6d40a0791a1 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Tue, 1 Sep 2026 12:04:13 -0500 Subject: [PATCH 3/7] refactor: import order on index.js and recommended.js --- index.js | 30 ++++++++++++----------- recommended.js | 65 ++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/index.js b/index.js index a46cc29..d27e738 100644 --- a/index.js +++ b/index.js @@ -3,26 +3,28 @@ const ts = require('@typescript-eslint/eslint-plugin'); const prettier = require('eslint-config-prettier/flat'); const importX = require('eslint-plugin-import-x'); -// Flat config ignores `--ext`, so the TypeScript scoping happens here. Keep in sync with recommended.js. +const overrides = { + rules: { + // https://eslint.org/docs/rules/ + 'no-fallthrough': 'off', // https://github.com/ionic-team/eslint-config/issues/7 + 'no-constant-condition': 'off', + + // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules + '@typescript-eslint/no-this-alias': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-module-boundary-types': ['warn', { 'allowArgumentsExplicitlyTypedAsAny': true }], + }, +}; + +// Flat config ignores `--ext`, so scope everything to TypeScript. Keep in sync with recommended.js. const TS_FILES = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']; module.exports = [ js.configs.recommended, ...ts.configs['flat/recommended'], - // import-x's own TypeScript preset needs a resolver package whose peers cap ESLint at v9, + // import-x's TypeScript preset needs a resolver package whose peers cap ESLint at v9, // so use the resolver import-x bundles instead. { plugins: { 'import-x': importX }, settings: { 'import-x/resolver-next': [importX.createNodeResolver()] } }, prettier, - { - rules: { - // https://eslint.org/docs/rules/ - 'no-fallthrough': 'off', // https://github.com/ionic-team/eslint-config/issues/7 - 'no-constant-condition': 'off', - - // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules - '@typescript-eslint/no-this-alias': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-module-boundary-types': ['warn', { 'allowArgumentsExplicitlyTypedAsAny': true }], - }, - }, + overrides, ].map((config) => (config.files ? config : { ...config, files: TS_FILES })); diff --git a/recommended.js b/recommended.js index 775f99d..4aa2b3b 100644 --- a/recommended.js +++ b/recommended.js @@ -1,38 +1,35 @@ const base = require('./index'); -// Keep in sync with index.js. -const TS_FILES = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts']; +const overrides = { + // Keep in sync with index.js. + files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], + rules: { + // ./index.js + '@typescript-eslint/explicit-module-boundary-types': [ + 'error', + { allowArgumentsExplicitlyTypedAsAny: true }, + ], + // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules + '@typescript-eslint/array-type': 'error', + '@typescript-eslint/consistent-type-assertions': 'error', + '@typescript-eslint/consistent-type-imports': 'error', + '@typescript-eslint/prefer-for-of': 'error', + // prefer-optional-chain was here under v5; as of v8 it needs type information. See README. -module.exports = [ - ...base, - { - files: TS_FILES, - rules: { - // ./index.js - '@typescript-eslint/explicit-module-boundary-types': [ - 'error', - { allowArgumentsExplicitlyTypedAsAny: true }, - ], - // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules - '@typescript-eslint/array-type': 'error', - '@typescript-eslint/consistent-type-assertions': 'error', - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/prefer-for-of': 'error', - // prefer-optional-chain was here under v5; as of v8 it needs type information. See README. - - // https://github.com/un-ts/eslint-plugin-import-x - 'import-x/first': 'error', - 'import-x/order': [ - 'error', - { - 'alphabetize': { order: 'asc', caseInsensitive: false }, - 'groups': [['builtin', 'external'], 'parent', ['sibling', 'index']], - 'newlines-between': 'always', - }, - ], - 'import-x/newline-after-import': 'error', - 'import-x/no-duplicates': 'error', - 'import-x/no-mutable-exports': 'error', - }, + // https://github.com/un-ts/eslint-plugin-import-x + 'import-x/first': 'error', + 'import-x/order': [ + 'error', + { + 'alphabetize': { order: 'asc', caseInsensitive: false }, + 'groups': [['builtin', 'external'], 'parent', ['sibling', 'index']], + 'newlines-between': 'always', + }, + ], + 'import-x/newline-after-import': 'error', + 'import-x/no-duplicates': 'error', + 'import-x/no-mutable-exports': 'error', }, -]; +}; + +module.exports = [...base, overrides]; From 0e3da2cca0e3cf88bfcd0e62f362384cc3ff23fb Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 2 Sep 2026 10:08:44 -0500 Subject: [PATCH 4/7] refactor: drop redundant comments --- recommended.js | 1 - 1 file changed, 1 deletion(-) diff --git a/recommended.js b/recommended.js index 4aa2b3b..be90ec8 100644 --- a/recommended.js +++ b/recommended.js @@ -14,7 +14,6 @@ const overrides = { '@typescript-eslint/consistent-type-assertions': 'error', '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/prefer-for-of': 'error', - // prefer-optional-chain was here under v5; as of v8 it needs type information. See README. // https://github.com/un-ts/eslint-plugin-import-x 'import-x/first': 'error', From 5121075bcd6ad7ec5c22915d1b1e9aa78770b475 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 9 Sep 2026 09:19:43 -0500 Subject: [PATCH 5/7] force eslint 10 --- README.md | 2 +- index.js | 2 ++ package.json | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 372e81b..4e61612 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Shared ESLint config used in Ionic and Capacitor projects. This is meant to be used alongside Prettier (with [`@ionic/prettier-config`](https://github.com/ionic-team/prettier-config/)). -> **v1.0.0 requires ESLint 9 or 10** and a flat config file. Staying on ESLint 8? Keep using +> **v1.0.0 requires ESLint 10** and a flat config file. Staying on ESLint 8 or 9? Keep using > `@ionic/eslint-config@0.4.0`. ## Usage diff --git a/index.js b/index.js index d27e738..c9a20e3 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,8 @@ const overrides = { '@typescript-eslint/no-this-alias': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/explicit-module-boundary-types': ['warn', { 'allowArgumentsExplicitlyTypedAsAny': true }], + // interface signatures often force unused parameters; an underscore marks them intentional + '@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_' }], }, }; diff --git a/package.json b/package.json index 8304b71..02b13b1 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ }, "homepage": "https://github.com/ionic-team/eslint-config#readme", "dependencies": { - "@eslint/js": "^9.0.0 || ^10.0.0", + "@eslint/js": "^10.0.0", "@typescript-eslint/eslint-plugin": "^8.56.0", "@typescript-eslint/parser": "^8.56.0", "eslint-config-prettier": "^10.1.8", "eslint-plugin-import-x": "^4.17.1" }, "peerDependencies": { - "eslint": "^9.0.0 || ^10.0.0" + "eslint": "^10.0.0" } } From 4ddafddfc743be1c0d09947c67bf21e0e8585b86 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 9 Sep 2026 09:54:10 -0500 Subject: [PATCH 6/7] move to 0.5.0 --- README.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4e61612..52b946b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Shared ESLint config used in Ionic and Capacitor projects. This is meant to be used alongside Prettier (with [`@ionic/prettier-config`](https://github.com/ionic-team/prettier-config/)). -> **v1.0.0 requires ESLint 10** and a flat config file. Staying on ESLint 8 or 9? Keep using +> **v0.5.0 requires ESLint 10** and a flat config file. Staying on ESLint 8 or 9? Keep using > `@ionic/eslint-config@0.4.0`. ## Usage @@ -52,7 +52,7 @@ JavaScript too, add your own config block. :memo: Not every rule in this configuration is autofixable, so `npm run fmt` may continue failing until lint issues are addressed manually. -## Migrating from 0.x +## Migrating from 0.4 or earlier 1. Delete the `eslintConfig` block from `package.json` (or any `.eslintrc` file). 2. Add an `eslint.config.cjs` as shown above. diff --git a/package.json b/package.json index 02b13b1..6f38063 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/eslint-config", - "version": "1.0.0", + "version": "0.5.0", "description": "Common eslint rules/preferences for Ionic.", "main": "index.js", "repository": { From fc4bac8f1f9aee0abd229611a8d95f00674c5efc Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 9 Sep 2026 10:25:21 -0500 Subject: [PATCH 7/7] add name entry --- index.js | 3 ++- recommended.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index c9a20e3..0324c09 100644 --- a/index.js +++ b/index.js @@ -4,6 +4,7 @@ const prettier = require('eslint-config-prettier/flat'); const importX = require('eslint-plugin-import-x'); const overrides = { + name: '@ionic/eslint-config/overrides', rules: { // https://eslint.org/docs/rules/ 'no-fallthrough': 'off', // https://github.com/ionic-team/eslint-config/issues/7 @@ -26,7 +27,7 @@ module.exports = [ ...ts.configs['flat/recommended'], // import-x's TypeScript preset needs a resolver package whose peers cap ESLint at v9, // so use the resolver import-x bundles instead. - { plugins: { 'import-x': importX }, settings: { 'import-x/resolver-next': [importX.createNodeResolver()] } }, + { name: '@ionic/eslint-config/import-x', plugins: { 'import-x': importX }, settings: { 'import-x/resolver-next': [importX.createNodeResolver()] } }, prettier, overrides, ].map((config) => (config.files ? config : { ...config, files: TS_FILES })); diff --git a/recommended.js b/recommended.js index be90ec8..7323904 100644 --- a/recommended.js +++ b/recommended.js @@ -1,6 +1,7 @@ const base = require('./index'); const overrides = { + name: '@ionic/eslint-config/recommended', // Keep in sync with index.js. files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], rules: {