Skip to content

Commit 1b13cd7

Browse files
feat: move to ESLint v9 👏 (#250)
BREAKING CHANGE: Projects must now use ESLint v9 in order to use these rulesets.
2 parents 836cdc8 + 517cc33 commit 1b13cd7

File tree

27 files changed

+6477
-5086
lines changed

27 files changed

+6477
-5086
lines changed

eslint.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ import node from './packages/eslint-config-node/index.mjs'
22
import optional from './packages/eslint-config-node/optional.mjs'
33
import style from './packages/eslint-config-node/style.mjs'
44

5-
/** @type {Array<import("eslint").Linter.FlatConfig>} */
6-
const configs = [{
5+
/** @type {Array<import("eslint").Linter.Config>} */
6+
const config = [{
77
linterOptions: {
88
reportUnusedDisableDirectives: true,
99
},
1010
ignores: [
1111
'node_modules',
1212
'!.*.js',
1313
],
14+
settings: {
15+
'import/resolver': { typescript: {} },
16+
},
1417
},
1518
node,
1619
optional,
1720
style,
18-
{ files: ['**/*.js', '**/*.mjs'], languageOptions: { sourceType: 'module' } },
19-
{ files: ['**/*.cjs'], languageOptions: { sourceType: 'commonjs' } },
20-
{ rules: {
21-
// TODO: Figure out why ESLint cannot resolve the @typescript-eslint packages
22-
'import/no-unresolved': 'off',
23-
} }]
21+
{
22+
rules: {},
23+
}]
2424

25-
export default configs
25+
export default config

package-lock.json

Lines changed: 6265 additions & 5033 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"Korneliusz Dubieniecki <lekterable@gmail.com>"
1212
],
1313
"devDependencies": {
14-
"@commitlint/cli": "^18.6.0",
15-
"eslint": "^8.57.0",
14+
"@commitlint/cli": "^19",
15+
"eslint": "^9",
1616
"lerna": "^8.1.2",
1717
"remark-cli": "^12.0.0",
1818
"remark-preset-lint-consistent": "^5",

packages/eslint-config-base/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [5.0.0-alpha.1](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-base@5.0.0-alpha.0...@strv/eslint-config-base@5.0.0-alpha.1) (2025-01-24)
7+
8+
**Note:** Version bump only for package @strv/eslint-config-base
9+
10+
11+
12+
13+
14+
# [5.0.0-alpha.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-base@4.0.0...@strv/eslint-config-base@5.0.0-alpha.0) (2025-01-24)
15+
16+
17+
### Features
18+
19+
* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))
20+
21+
22+
### BREAKING CHANGES
23+
24+
* Projects must now use ESLint v9 in order to use these rulesets.
25+
26+
27+
28+
29+
630
# [4.0.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-base@3.5.0...@strv/eslint-config-base@4.0.0) (2024-02-16)
731

832

packages/eslint-config-base/index.mjs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import imports from 'eslint-plugin-import'
22
import stylistic from '@stylistic/eslint-plugin'
33

4-
/** @type {import("eslint").Linter.FlatConfig} */
4+
/** @type {import("eslint").Linter.Config} */
55
const config = {
66
plugins: {
77
import: imports,
@@ -590,9 +590,7 @@ const config = {
590590
'vars-on-top': 'warn',
591591

592592
// Ensure an imported module can be resolved to a module on the local filesystem
593-
'import/no-unresolved': ['error', {
594-
commonjs: true,
595-
}],
593+
'import/no-unresolved': ['error'],
596594

597595
// Verifies that all named imports are part of the set of named exports in the referenced module
598596
'import/named': 'error',
@@ -605,8 +603,7 @@ const config = {
605603
'import/first': 'error',
606604

607605
// Enforces names exist at the time they are dereferenced, when imported as a full namespace
608-
// TODO: Re-enable when eslint-plugin-import gets ESLint flat config support
609-
// 'import/namespace': 'error',
606+
'import/namespace': 'error',
610607

611608
// Forbid import of modules using absolute paths
612609
// Node.js allows the import of modules using an absolute path such as */home/xyz/file.js*. That

packages/eslint-config-base/optional.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import imports from 'eslint-plugin-import'
22

3-
/** @type {import("eslint").Linter.FlatConfig} */
3+
/** @type {import("eslint").Linter.Config} */
44
const config = {
55
plugins: {
66
import: imports,

packages/eslint-config-base/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@strv/eslint-config-base",
33
"description": "STRV's ESLint configuration preset",
4-
"version": "4.0.0",
4+
"version": "5.0.0-alpha.1",
55
"author": "Pavel Prichodko <prichodko.p@gmail.com>",
66
"bugs": {
77
"url": "https://github.com/strvcom/code-quality-tools/issues"
@@ -11,8 +11,8 @@
1111
"Danny Kijkov <daniel.kijkov@strv.com>"
1212
],
1313
"dependencies": {
14-
"@stylistic/eslint-plugin": "^1.6.0",
15-
"eslint-plugin-import": "^2.27.0"
14+
"@stylistic/eslint-plugin": "^2.13.0",
15+
"eslint-plugin-import": "^2.31.0"
1616
},
1717
"engines": {
1818
"node": ">=20"
@@ -30,7 +30,7 @@
3030
"./style": "./style.mjs"
3131
},
3232
"peerDependencies": {
33-
"eslint": "^8"
33+
"eslint": "^9"
3434
},
3535
"publishConfig": {
3636
"access": "public"

packages/eslint-config-base/style.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import imports from 'eslint-plugin-import'
22
import stylistic from '@stylistic/eslint-plugin'
33

4-
/** @type {import("eslint").Linter.FlatConfig} */
4+
/** @type {import("eslint").Linter.Config} */
55
const config = {
66
plugins: {
77
import: imports,
@@ -166,6 +166,8 @@ const config = {
166166
'R',
167167
// jQuery 🤮
168168
'$',
169+
// vitest in-test context: `it('works', t => { t.expect(1).toBe(1) })`
170+
't',
169171
],
170172
}],
171173

@@ -227,7 +229,7 @@ const config = {
227229

228230
// Enforce a particular style for multiline comments
229231
// Prefer consecutive line comments for multiline comment block
230-
'multiline-comment-style': ['warn', 'separate-lines'],
232+
'@stylistic/multiline-comment-style': ['warn', 'separate-lines'],
231233

232234
// Enforce newlines between operands of ternary expressions
233235
// Enforce either the whole ternary on a single line or each part of the ternary on its own line

packages/eslint-config-graphql/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [3.0.0-alpha.1](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-graphql@3.0.0-alpha.0...@strv/eslint-config-graphql@3.0.0-alpha.1) (2025-01-24)
7+
8+
**Note:** Version bump only for package @strv/eslint-config-graphql
9+
10+
11+
12+
13+
14+
# [3.0.0-alpha.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-graphql@2.0.0...@strv/eslint-config-graphql@3.0.0-alpha.0) (2025-01-24)
15+
16+
17+
### Features
18+
19+
* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))
20+
21+
22+
### BREAKING CHANGES
23+
24+
* Projects must now use ESLint v9 in order to use these rulesets.
25+
26+
27+
28+
29+
630
# [2.0.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-graphql@1.1.0...@strv/eslint-config-graphql@2.0.0) (2024-02-16)
731

832

packages/eslint-config-graphql/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// TODO: Deprecated. Move to https://github.com/dimaMachina/graphql-eslint
22
import graphql from 'eslint-plugin-graphql'
33

4-
/** @type {import("eslint").Linter.FlatConfig} */
4+
/** @type {import("eslint").Linter.Config} */
55
const config = {
66
plugins: {
77
graphql,

packages/eslint-config-graphql/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@strv/eslint-config-graphql",
33
"description": "STRV's ESLint config for javascript applications that use GraphQL and Apollo client.",
4-
"version": "2.0.0",
4+
"version": "3.0.0-alpha.1",
55
"author": "Michal Jarnot <m.jarnot@yahoo.com>",
66
"bugs": {
77
"url": "https://github.com/strvcom/code-quality-tools/issues"
@@ -25,7 +25,7 @@
2525
],
2626
"license": "BSD-3-Clause",
2727
"peerDependencies": {
28-
"eslint": "^8"
28+
"eslint": "^9"
2929
},
3030
"publishConfig": {
3131
"access": "public"

packages/eslint-config-mocha/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [5.0.0-alpha.1](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-mocha@5.0.0-alpha.0...@strv/eslint-config-mocha@5.0.0-alpha.1) (2025-01-24)
7+
8+
**Note:** Version bump only for package @strv/eslint-config-mocha
9+
10+
11+
12+
13+
14+
# [5.0.0-alpha.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-mocha@4.0.0...@strv/eslint-config-mocha@5.0.0-alpha.0) (2025-01-24)
15+
16+
17+
### Features
18+
19+
* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))
20+
21+
22+
### BREAKING CHANGES
23+
24+
* Projects must now use ESLint v9 in order to use these rulesets.
25+
26+
27+
28+
29+
630
# [4.0.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-mocha@3.3.2...@strv/eslint-config-mocha@4.0.0) (2024-02-16)
731

832

packages/eslint-config-mocha/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import mocha from 'eslint-plugin-mocha'
22
import imports from 'eslint-plugin-import'
33

4-
/** @type {import("eslint").Linter.FlatConfig} */
4+
/** @type {import("eslint").Linter.Config} */
55
const config = {
66
plugins: {
77
mocha,

packages/eslint-config-mocha/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@strv/eslint-config-mocha",
33
"description": "STRV's ESLint config for projects using Mocha as test runner",
4-
"version": "4.0.0",
4+
"version": "5.0.0-alpha.1",
55
"author": "Robert Rossmann <rr.rossmann@me.com>",
66
"bugs": {
77
"url": "https://github.com/strvcom/code-quality-tools/issues"
@@ -11,8 +11,8 @@
1111
"Danny Kijkov <daniel.kijkov@strv.com>"
1212
],
1313
"dependencies": {
14-
"@strv/eslint-config-base": "^4.0.0",
15-
"eslint-plugin-import": "^2.27.0",
14+
"@strv/eslint-config-base": "^5.0.0-alpha.1",
15+
"eslint-plugin-import": "^2.31.0",
1616
"eslint-plugin-mocha": "^10.1.0"
1717
},
1818
"engines": {
@@ -30,7 +30,7 @@
3030
],
3131
"license": "BSD-3-Clause",
3232
"peerDependencies": {
33-
"eslint": "^8"
33+
"eslint": "^9"
3434
},
3535
"publishConfig": {
3636
"access": "public"

packages/eslint-config-node/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [5.0.0-alpha.1](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-node@5.0.0-alpha.0...@strv/eslint-config-node@5.0.0-alpha.1) (2025-01-24)
7+
8+
**Note:** Version bump only for package @strv/eslint-config-node
9+
10+
11+
12+
13+
14+
# [5.0.0-alpha.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-node@4.0.0...@strv/eslint-config-node@5.0.0-alpha.0) (2025-01-24)
15+
16+
17+
### Features
18+
19+
* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))
20+
21+
22+
### BREAKING CHANGES
23+
24+
* Projects must now use ESLint v9 in order to use these rulesets.
25+
26+
27+
28+
29+
630
# [4.0.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-node@3.3.2...@strv/eslint-config-node@4.0.0) (2024-02-16)
731

832

packages/eslint-config-node/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import node from 'eslint-plugin-n'
22
import base from '@strv/eslint-config-base'
33

4-
/** @type {import("eslint").Linter.FlatConfig} */
4+
/** @type {import("eslint").Linter.Config} */
55
const config = {
66
plugins: {
77
...base.plugins,

packages/eslint-config-node/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@strv/eslint-config-node",
33
"description": "STRV's ESLint config for Node.js projects",
4-
"version": "4.0.0",
4+
"version": "5.0.0-alpha.1",
55
"author": "Pavel Prichodko <prichodko.p@gmail.com>",
66
"bugs": {
77
"url": "https://github.com/strvcom/code-quality-tools/issues"
@@ -11,8 +11,8 @@
1111
"Danny Kijkov <daniel.kijkov@strv.com>"
1212
],
1313
"dependencies": {
14-
"@strv/eslint-config-base": "^4.0.0",
15-
"eslint-plugin-n": "^16.6.2"
14+
"@strv/eslint-config-base": "^5.0.0-alpha.1",
15+
"eslint-plugin-n": "^17.15.0"
1616
},
1717
"engines": {
1818
"node": ">=20"
@@ -32,7 +32,7 @@
3232
"./style": "./style.mjs"
3333
},
3434
"peerDependencies": {
35-
"eslint": "^8"
35+
"eslint": "^9"
3636
},
3737
"publishConfig": {
3838
"access": "public"

packages/eslint-config-node/v20.mjs

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/eslint-config-react/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [6.0.0-alpha.1](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-react@6.0.0-alpha.0...@strv/eslint-config-react@6.0.0-alpha.1) (2025-01-24)
7+
8+
**Note:** Version bump only for package @strv/eslint-config-react
9+
10+
11+
12+
13+
14+
# [6.0.0-alpha.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-react@5.0.0...@strv/eslint-config-react@6.0.0-alpha.0) (2025-01-24)
15+
16+
17+
### Features
18+
19+
* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))
20+
21+
22+
### BREAKING CHANGES
23+
24+
* Projects must now use ESLint v9 in order to use these rulesets.
25+
26+
27+
28+
29+
630
# [5.0.0](https://github.com/strvcom/code-quality-tools/compare/@strv/eslint-config-react@4.3.2...@strv/eslint-config-react@5.0.0) (2024-02-16)
731

832

0 commit comments

Comments
 (0)