Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cheminfo/eslint-config
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v12.0.1
Choose a base ref
...
head repository: cheminfo/eslint-config
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v13.0.0
Choose a head ref
  • 4 commits
  • 4 files changed
  • 2 contributors

Commits on Nov 19, 2024

  1. chore: update dependencies

    targos committed Nov 19, 2024
    Copy the full SHA
    e52c013 View commit details

Commits on Nov 20, 2024

  1. Copy the full SHA
    3c65c87 View commit details
  2. feat!: require ESLint >=9.15.0

    targos committed Nov 20, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    arvidfm Arvid Fahlström Myrman
    Copy the full SHA
    3d595dc View commit details
  3. chore(main): release 13.0.0 (#68)

    cheminfo-bot authored Nov 20, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    arvidfm Arvid Fahlström Myrman
    Copy the full SHA
    0f20951 View commit details
Showing with 93 additions and 26 deletions.
  1. +13 −0 CHANGELOG.md
  2. +73 −20 base.js
  3. +6 −6 package.json
  4. +1 −0 test/test.js
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [13.0.0](https://github.com/cheminfo/eslint-config/compare/v12.0.1...v13.0.0) (2024-11-20)


### ⚠ BREAKING CHANGES

* require ESLint >=9.15.0
* update and review import plugin rules

### Features

* require ESLint >=9.15.0 ([3d595dc](https://github.com/cheminfo/eslint-config/commit/3d595dc521a42cffb5237804f2164312aa658f71))
* update and review import plugin rules ([3c65c87](https://github.com/cheminfo/eslint-config/commit/3c65c87ec24f342d0f5081043fdfd11bc6dc8891))

## [12.0.1](https://github.com/cheminfo/eslint-config/compare/v12.0.0...v12.0.1) (2024-10-07)


93 changes: 73 additions & 20 deletions base.js
Original file line number Diff line number Diff line change
@@ -19,10 +19,10 @@ export default [

rules: {
// https://eslint.org/docs/latest/rules/
// Last rules review: v8.56.0
// Last rules review: v9.15.0

// https://github.com/import-js/eslint-plugin-import#rules
// Last rules review: v2.26.0
// Last rules review: v2.31.0

//#region Possible Problems (https://eslint.org/docs/latest/rules/#possible-problems)
'array-callback-return': 'error',
@@ -231,18 +231,83 @@ export default [
//#endregion

//#region Import plugin (https://github.com/import-js/eslint-plugin-import#rules)
// Helpful warnings
'import/export': 'error',
// Handled by the TypeScript plugin.
// 'import/no-deprecated': 'off',
'import/no-empty-named-blocks': 'error',
'import/no-extraneous-dependencies': 'error',
// The `prefer-const` rule already handles wrong use of `let`.
// 'import/no-mutable-exports': 'off',
'import/no-named-as-default': 'error',
'import/no-named-as-default-member': 'error',
// This should be enabled and configured in projects on a case-by-case basis.
// 'import/no-unused-modules': 'off',

// Module systems
// No risk to introduce it by mistake.
// 'import/no-amd': 'off',
// Not ready for this.
// 'import/no-commonjs': 'off',
// We don't do this mistake.
// 'import/no-import-module-exports': 'off',
// Why wouldn't we?
// 'import/no-nodejs-modules': 'off',
// Very rare and has not been an issue for us.
// 'import/unambiguous': 'off',

// Static analysis
// These are bugs that can be caught by tests and TypeScript.
// 'import/default': 'off',
// 'import/named': 'off',
// 'import/namespace': 'off',
'import/no-absolute-path': 'error',
'import/no-webpack-loader-syntax': 'error',
// TODO: maybe enable at some point

Check warning on line 265 in base.js

GitHub Actions / nodejs / lint-eslint

Unexpected 'todo' comment: 'TODO: maybe enable at some point'
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-cycle.md
// 'import/no-cycle': 'off',
'import/no-dynamic-require': 'error',
// This should be enabled and configured in projects on a case-by-case basis.
// 'import/no-internal-modules': 'off',
// 'import/no-relative-packages': 'off',
// 'import/no-relative-parent-imports': 'off',
// 'import/no-restricted-paths': 'off',
'import/no-self-import': 'error',
// Resolver doesn't support all recent node features.
// 'import/no-unresolved': 'off',
'import/no-useless-path-segments': 'error',

// Module systems
'import/no-amd': 'error',
'import/no-webpack-loader-syntax': 'error',

// Style guide
// Will be enabled in the TypeScript config.
// 'import/consistent-type-specifier-style': 'off',
// We don't use webpack.
// 'import/dynamic-import-chunkname': 'off',
// We never do that.
// 'import/exports-last': 'off',
// We handle this in TypeScript and resolver doesn't support all recent node features.
// 'import/extensions': 'off',
'import/first': 'error',
// We never do that.
// 'import/group-exports': 'off',
// Difficult to avoid it in React components.
// 'import/max-dependencies': 'off',
'import/newline-after-import': 'error',
// There are cases where it makes sense.
// 'import/no-anonymous-default-export': 'off',
// This is essentially incompatible with React.
// 'import/no-default-export': 'off',
'import/no-duplicates': 'error',
'import/no-named-default': 'error',
// Of course not.
// 'import/no-named-export': 'off',
// Sometimes we need it in TypeScript.
// 'import/no-namespace': 'off',
'import/no-unassigned-import': [
'error',
{
allow: ['dotenv/config', 'reflect-metadata', '**/*.css'],
},
],
'import/order': [
'warn',
{
@@ -260,20 +325,8 @@ export default [
},
},
],
'import/newline-after-import': 'error',
'import/no-unassigned-import': [
'warn',
{
allow: [
'make-promises-safe',
'node-report',
'reflect-metadata',
'**/*.css',
'react-app-polyfill/*',
],
},
],
'import/no-named-default': 'error',
// We usually mix default and named exports, especially in React projects.
// 'import/prefer-default-export': 'off',
//#endregion
},
},
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-cheminfo",
"version": "12.0.1",
"version": "13.0.0",
"description": "Shared ESLint config for cheminfo and ml.js projects",
"type": "module",
"exports": {
@@ -36,15 +36,15 @@
"homepage": "https://github.com/cheminfo/eslint-config#readme",
"dependencies": {
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^50.3.1",
"eslint-plugin-unicorn": "^56.0.0",
"globals": "^15.10.0"
"eslint-plugin-jsdoc": "^50.5.0",
"eslint-plugin-unicorn": "^56.0.1",
"globals": "^15.12.0"
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.12.0"
"eslint": "^9.15.0"
},
"devDependencies": {
"eslint": "9.12.0",
"eslint": "9.15.0",
"prettier": "^3.3.3"
}
}
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ const errors = notOkResult.messages

assert.deepStrictEqual(errors, [
'import/no-absolute-path',
'import/no-unassigned-import',
'no-console',
'no-redeclare',
'no-unused-vars',