Skip to content
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

fix: add support for eslint 9 #111

Closed
wants to merge 1 commit into from
Closed

fix: add support for eslint 9 #111

wants to merge 1 commit into from

Conversation

reggi
Copy link
Contributor

@reggi reggi commented Jun 12, 2024

References

@reggi reggi requested a review from a team as a code owner June 12, 2024 13:35
Copy link

@voxpelli voxpelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also consider basing this config on https://github.com/neostandard/neostandard instead and help out getting a good base config for the ecosystem at large. (neostandard is a maintained open governance fork of the standard project)

parserOptions: {
const globals = require("globals")
const js = require("@eslint/js")
const pluginNode = require("eslint-plugin-node")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use eslint-plugin-n instead, its the currently supported fork and maintained by us in the official eslint-community: https://github.com/eslint-community/eslint-plugin-n

const globals = require("globals")
const js = require("@eslint/js")
const pluginNode = require("eslint-plugin-node")
const pluginImport = require("eslint-plugin-import")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not yet support ESLint 9: import-js/eslint-plugin-import#2948

See also: neostandard/neostandard#15

const js = require("@eslint/js")
const pluginNode = require("eslint-plugin-node")
const pluginImport = require("eslint-plugin-import")
const pluginPromise = require("eslint-plugin-promise")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not yet support ESLint 9: eslint-community/eslint-plugin-promise#449 We will get to it within the eslint-community

See also: neostandard/neostandard#14

Comment on lines +218 to +233
{
files: ['test/**'],
rules: {
'no-global-assign': 'off',
'no-extend-native': 'off',
},
}, {
files: ['lib/**', 'bin/**'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
},
}, {
files: ['lib/**'],
rules: {
'no-console': 'error',
},

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add descriptive names to these to more easily identify them in eg. the config inspector, eg:

Suggested change
{
files: ['test/**'],
rules: {
'no-global-assign': 'off',
'no-extend-native': 'off',
},
}, {
files: ['lib/**', 'bin/**'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
},
}, {
files: ['lib/**'],
rules: {
'no-console': 'error',
},
{
name: 'Test adaptions',
files: ['test/**'],
rules: {
'no-global-assign': 'off',
'no-extend-native': 'off',
},
}, {
name: 'Shipping code adaptions',
files: ['lib/**', 'bin/**'],
rules: {
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
},
}, {
name: 'Shipping code adaptions, non-cli',
files: ['lib/**'],
rules: {
'no-console': 'error',
},

sourceType: 'script',
globals: {
...globals.browser,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous env was es6 + node, not browser + node

@reggi
Copy link
Contributor Author

reggi commented Jun 12, 2024

@voxpelli thanks for your contributions here, I was editing the node_modules version pushing to get it to work and didn't want to loose my changes so I parked them here (should have been a draft pr) thanks for looking at this!

@wraithgar wraithgar marked this pull request as draft June 12, 2024 15:35
@reggi reggi closed this Jul 9, 2024
@wraithgar wraithgar deleted the reggi-patch-1 branch July 9, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants