Config json cloning is a BREAKING CHANGE!
See original GitHub issueRelated: https://github.com/eslint/eslint/pull/13034#discussion_r446611500
Tell us about your environment
- ESLint Version: 7.3.1
- Node Version: v14.4.0
- npm Version: 6.14.4
What parser (default, Babel-ESLint, etc.) are you using?
Please show your full configuration:
Configuration
module.exports = {
extends: 'plugin:unicorn/recommended',
rules: {
'unicorn/filename-case': [
2,
{
cases: {
kebabCase: true,
pascalCase: true,
},
// ignore UPPER_CASE markdown filenames
ignore: [/^[A-Z](([\dA-Z]+_)*[\dA-Z]+)?\.mdx?$/],
},
]
}
}
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
<!-- README.md -->
eslint README.md
What did you expect to happen? no error
What actually happened? Please include the actual, raw output from ESLint.
1:2 error Filename is not in kebab case or pascal case. Rename it to `readme.md` or `Readme.md` unicorn/filename-case
The error occurres because the ESLint config is json cloned since v7.3.0, and this breaks Regxp
option of unicorn/filename-case
, I don’t think this is an invalid usage.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
What is the most efficient way to deep clone an object in ...
According to JSPerf, performing native cloning by creating a new function is nearly 800x slower than using JSON.stringify which is incredibly fast all...
Read more >Usage | Buf®
The above buf breaking command: Discovers all Protobuf files per your configuration. Copies all Protobuf files into memory. Compiles all Protobuf files. Clones...
Read more >System clone - Product Documentation | ServiceNow
Use the System Clone application to copy everything in a database from one instance to another.
Read more >Breaking Changes | Electron
Default Changed: Code depending on the old default may break, not necessarily throwing an exception. The old behavior can be restored by explicitly...
Read more >Deprecations by version - GitLab Docs
DAST ZAP advanced configuration variables deprecation. Planned removal: GitLab 16.0 (2023-05-22). This is a breaking change.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The discussion was to wait and see how many bug reports we received before deciding whether to revert or not. We had just one report of the use of
Infinity
, and given that was clearly a bug and could be easily replaced with a valid number to work the same, we decided to add a patch to allow that isolated case.This case is more concerning because it involves encouraging end users to use regular expressions in their configs (vs one isolated instance of
Infinity
in one config).With this new data, I’m in favor of reverting the change.
similar to https://github.com/eslint/eslint/pull/13034#issuecomment-632339452 ?