Skip to content

feat: move to ESLint v9 👏 #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ import node from './packages/eslint-config-node/index.mjs'
import optional from './packages/eslint-config-node/optional.mjs'
import style from './packages/eslint-config-node/style.mjs'

/** @type {Array<import("eslint").Linter.FlatConfig>} */
const configs = [{
/** @type {Array<import("eslint").Linter.Config>} */
const config = [{
linterOptions: {
reportUnusedDisableDirectives: true,
},
ignores: [
'node_modules',
'!.*.js',
],
settings: {
'import/resolver': { typescript: {} },
},
},
node,
optional,
style,
{ files: ['**/*.js', '**/*.mjs'], languageOptions: { sourceType: 'module' } },
{ files: ['**/*.cjs'], languageOptions: { sourceType: 'commonjs' } },
{ rules: {
// TODO: Figure out why ESLint cannot resolve the @typescript-eslint packages
'import/no-unresolved': 'off',
} }]
{
rules: {},
}]

export default configs
export default config
11,298 changes: 6,265 additions & 5,033 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"Korneliusz Dubieniecki <lekterable@gmail.com>"
],
"devDependencies": {
"@commitlint/cli": "^18.6.0",
"eslint": "^8.57.0",
"@commitlint/cli": "^19",
"eslint": "^9",
"lerna": "^8.1.2",
"remark-cli": "^12.0.0",
"remark-preset-lint-consistent": "^5",
Expand Down
24 changes: 24 additions & 0 deletions packages/eslint-config-base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)

**Note:** Version bump only for package @strv/eslint-config-base





# [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)


### Features

* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))


### BREAKING CHANGES

* Projects must now use ESLint v9 in order to use these rulesets.





# [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)


Expand Down
9 changes: 3 additions & 6 deletions packages/eslint-config-base/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import imports from 'eslint-plugin-import'
import stylistic from '@stylistic/eslint-plugin'

/** @type {import("eslint").Linter.FlatConfig} */
/** @type {import("eslint").Linter.Config} */
const config = {
plugins: {
import: imports,
Expand Down Expand Up @@ -590,9 +590,7 @@ const config = {
'vars-on-top': 'warn',

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

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

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

// Forbid import of modules using absolute paths
// Node.js allows the import of modules using an absolute path such as */home/xyz/file.js*. That
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-base/optional.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import imports from 'eslint-plugin-import'

/** @type {import("eslint").Linter.FlatConfig} */
/** @type {import("eslint").Linter.Config} */
const config = {
plugins: {
import: imports,
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config-base/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@strv/eslint-config-base",
"description": "STRV's ESLint configuration preset",
"version": "4.0.0",
"version": "5.0.0-alpha.1",
"author": "Pavel Prichodko <prichodko.p@gmail.com>",
"bugs": {
"url": "https://github.com/strvcom/code-quality-tools/issues"
Expand All @@ -11,8 +11,8 @@
"Danny Kijkov <daniel.kijkov@strv.com>"
],
"dependencies": {
"@stylistic/eslint-plugin": "^1.6.0",
"eslint-plugin-import": "^2.27.0"
"@stylistic/eslint-plugin": "^2.13.0",
"eslint-plugin-import": "^2.31.0"
},
"engines": {
"node": ">=20"
Expand All @@ -30,7 +30,7 @@
"./style": "./style.mjs"
},
"peerDependencies": {
"eslint": "^8"
"eslint": "^9"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 4 additions & 2 deletions packages/eslint-config-base/style.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import imports from 'eslint-plugin-import'
import stylistic from '@stylistic/eslint-plugin'

/** @type {import("eslint").Linter.FlatConfig} */
/** @type {import("eslint").Linter.Config} */
const config = {
plugins: {
import: imports,
Expand Down Expand Up @@ -166,6 +166,8 @@ const config = {
'R',
// jQuery 🤮
'$',
// vitest in-test context: `it('works', t => { t.expect(1).toBe(1) })`
't',
],
}],

Expand Down Expand Up @@ -227,7 +229,7 @@ const config = {

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

// Enforce newlines between operands of ternary expressions
// Enforce either the whole ternary on a single line or each part of the ternary on its own line
Expand Down
24 changes: 24 additions & 0 deletions packages/eslint-config-graphql/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)

**Note:** Version bump only for package @strv/eslint-config-graphql





# [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)


### Features

* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))


### BREAKING CHANGES

* Projects must now use ESLint v9 in order to use these rulesets.





# [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)


Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-graphql/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// TODO: Deprecated. Move to https://github.com/dimaMachina/graphql-eslint

Check warning on line 1 in packages/eslint-config-graphql/index.mjs

View workflow job for this annotation

GitHub Actions / lint

Unexpected 'todo' comment: 'TODO: Deprecated. Move to...'

Check warning on line 1 in packages/eslint-config-graphql/index.mjs

View workflow job for this annotation

GitHub Actions / lint

Unexpected 'todo' comment: 'TODO: Deprecated. Move to...'
import graphql from 'eslint-plugin-graphql'

/** @type {import("eslint").Linter.FlatConfig} */
/** @type {import("eslint").Linter.Config} */
const config = {
plugins: {
graphql,
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-graphql/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@strv/eslint-config-graphql",
"description": "STRV's ESLint config for javascript applications that use GraphQL and Apollo client.",
"version": "2.0.0",
"version": "3.0.0-alpha.1",
"author": "Michal Jarnot <m.jarnot@yahoo.com>",
"bugs": {
"url": "https://github.com/strvcom/code-quality-tools/issues"
Expand All @@ -25,7 +25,7 @@
],
"license": "BSD-3-Clause",
"peerDependencies": {
"eslint": "^8"
"eslint": "^9"
},
"publishConfig": {
"access": "public"
Expand Down
24 changes: 24 additions & 0 deletions packages/eslint-config-mocha/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)

**Note:** Version bump only for package @strv/eslint-config-mocha





# [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)


### Features

* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))


### BREAKING CHANGES

* Projects must now use ESLint v9 in order to use these rulesets.





# [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)


Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-mocha/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import mocha from 'eslint-plugin-mocha'
import imports from 'eslint-plugin-import'

/** @type {import("eslint").Linter.FlatConfig} */
/** @type {import("eslint").Linter.Config} */
const config = {
plugins: {
mocha,
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config-mocha/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@strv/eslint-config-mocha",
"description": "STRV's ESLint config for projects using Mocha as test runner",
"version": "4.0.0",
"version": "5.0.0-alpha.1",
"author": "Robert Rossmann <rr.rossmann@me.com>",
"bugs": {
"url": "https://github.com/strvcom/code-quality-tools/issues"
Expand All @@ -11,8 +11,8 @@
"Danny Kijkov <daniel.kijkov@strv.com>"
],
"dependencies": {
"@strv/eslint-config-base": "^4.0.0",
"eslint-plugin-import": "^2.27.0",
"@strv/eslint-config-base": "^5.0.0-alpha.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-mocha": "^10.1.0"
},
"engines": {
Expand All @@ -30,7 +30,7 @@
],
"license": "BSD-3-Clause",
"peerDependencies": {
"eslint": "^8"
"eslint": "^9"
},
"publishConfig": {
"access": "public"
Expand Down
24 changes: 24 additions & 0 deletions packages/eslint-config-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)

**Note:** Version bump only for package @strv/eslint-config-node





# [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)


### Features

* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))


### BREAKING CHANGES

* Projects must now use ESLint v9 in order to use these rulesets.





# [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)


Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-node/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import node from 'eslint-plugin-n'
import base from '@strv/eslint-config-base'

/** @type {import("eslint").Linter.FlatConfig} */
/** @type {import("eslint").Linter.Config} */
const config = {
plugins: {
...base.plugins,
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config-node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@strv/eslint-config-node",
"description": "STRV's ESLint config for Node.js projects",
"version": "4.0.0",
"version": "5.0.0-alpha.1",
"author": "Pavel Prichodko <prichodko.p@gmail.com>",
"bugs": {
"url": "https://github.com/strvcom/code-quality-tools/issues"
Expand All @@ -11,8 +11,8 @@
"Danny Kijkov <daniel.kijkov@strv.com>"
],
"dependencies": {
"@strv/eslint-config-base": "^4.0.0",
"eslint-plugin-n": "^16.6.2"
"@strv/eslint-config-base": "^5.0.0-alpha.1",
"eslint-plugin-n": "^17.15.0"
},
"engines": {
"node": ">=20"
Expand All @@ -32,7 +32,7 @@
"./style": "./style.mjs"
},
"peerDependencies": {
"eslint": "^8"
"eslint": "^9"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-config-node/v20.mjs

This file was deleted.

24 changes: 24 additions & 0 deletions packages/eslint-config-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [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)

**Note:** Version bump only for package @strv/eslint-config-react





# [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)


### Features

* move to ESLint v9 👏 ([4de1c1f](https://github.com/strvcom/code-quality-tools/commit/4de1c1f7543898cddc4178afc7222e369b6ea018))


### BREAKING CHANGES

* Projects must now use ESLint v9 in order to use these rulesets.





# [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)


Expand Down
Loading