-
Notifications
You must be signed in to change notification settings - Fork 5
release v3.0.0 of eslint-config (dependency upgrades) #28
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
Changes from 4 commits
f2cfc95
0f1c71a
86610be
8a038f2
58570fb
a5b8661
75bab6b
b898c97
ca53908
f13ad20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| const baseConfig = require('./base') | ||
| import baseConfig from './base.js' | ||
|
|
||
| module.exports = [ | ||
| export default [ | ||
| ...baseConfig, | ||
| { | ||
| languageOptions: { | ||
|
|
@@ -19,14 +19,17 @@ module.exports = [ | |
| 'import/unambiguous': 'off', | ||
| 'import/no-commonjs': 'off', | ||
| 'import/no-unused-modules': 'off', | ||
| // ESM requires .js extensions for relative imports | ||
| 'import/extensions': [ | ||
| 'error', | ||
| 'ignorePackages', | ||
| { | ||
| js: 'never', | ||
| js: 'always', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since, this is a behaviour change, I would suggest that we import the package from this PR locally into xrpl.js to make sure that linting passes or evaluate how much work needs to be done to fix linting errors that occurs after this change.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have ensured that this behavioral change only affects the files located inside this specific package. No downstream users of this package are affected by this change due to the regex used in the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated in 75bab6b
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see it's only suppressed for this repo.
The regex applies only for this repo. Did we try importing the package from this branch into xrpl.js to check if it works fine?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I will do that in some time and get back to you. I wasn't sure how to import an unpublished package (this new version of typescript-style repo) into xrpl.js
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When importing a package locally, I would first delete node_modules and package-lock.json and install it fresh. We can import it something like this:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here is the PR that uses the new versions of dependencies: XRPLF/xrpl.js#3187 The linter passes for this PR (on my local computer, it might not clear the CI) and all the unit tests pass.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool! I guess package-lock.json in this PR is outdated based on package version. Should regenerate it. |
||
| mjs: 'always', | ||
| }, | ||
| ], | ||
| // Allow anonymous default exports in ESLint config files | ||
| 'import/no-anonymous-default-export': 'off', | ||
| }, | ||
| }, | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| const base = require('./base') | ||
| const react = require('./rules/react') | ||
| import base from './base.js' | ||
| import react from './rules/react.js' | ||
|
|
||
| module.exports = [...react, ...base] | ||
| export default [...react, ...base] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| const looseBase = require('./loose-base') | ||
| const react = require('./rules/react') | ||
| import looseBase from './loose-base.js' | ||
| import react from './rules/react.js' | ||
|
|
||
| module.exports = [...react, ...looseBase] | ||
| export default [...react, ...looseBase] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| { | ||
| "name": "@xrplf/eslint-config", | ||
| "version": "2.0.0", | ||
| "version": "2.1.0", | ||
| "type": "module", | ||
| "description": "The XRPL Foundation's base TypeScript ESLint config, following our styleguide", | ||
| "keywords": [ | ||
| "eslint", | ||
|
|
@@ -33,15 +34,15 @@ | |
| "eslint": "^9.0.0", | ||
| "eslint-config-prettier": "^10.0.0", | ||
| "eslint-import-resolver-typescript": "^4.0.0", | ||
| "eslint-plugin-array-func": "^4.0.0", | ||
| "eslint-plugin-array-func": "^5.1.0", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: We should keep peerDependencies ^5.0.0 for greater compatibility.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok f13ad20 |
||
| "eslint-plugin-import": "^2.32.0", | ||
| "eslint-plugin-jsdoc": "^52.0.0", | ||
| "eslint-plugin-jsx-a11y": "^6.0.0", | ||
| "eslint-plugin-n": "^17.0.0", | ||
| "eslint-plugin-prettier": "^5.0.0", | ||
| "eslint-plugin-react": "^7.0.0", | ||
| "eslint-plugin-react-hooks": "^5.0.0", | ||
| "eslint-plugin-tsdoc": "^0.4.0", | ||
| "eslint-plugin-tsdoc": "^0.5.0", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ^0.5.0 would make @xrplf/eslint-config release a breaking change. Consumers with eslint-plugin-tsdoc < 0.5.0 won't be able to install @xrplf/eslint-config. So when we release this, we should do major version bump of @xrplf/eslint-config
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "globals": "^16.0.0", | ||
| "prettier": "^3.0.0", | ||
| "typescript": ">=4.8.4", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.