question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Config json cloning is a BREAKING CHANGE!

See original GitHub issue

Related: 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?

eslint-mdx

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:closed
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

4reactions
nzakascommented, Jun 30, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found