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

Support ESLint's new flat config #11161

Open
2 of 5 tasks
jcfranco opened this issue Dec 28, 2024 · 0 comments
Open
2 of 5 tasks

Support ESLint's new flat config #11161

jcfranco opened this issue Dec 28, 2024 · 0 comments
Labels
0 - new New issues that need assignment. Calcite (dev) Issues logged by Calcite developers. enhancement Issues tied to a new feature or request. eslint-plugin-calcite-components Issues specific to the @esri/eslint-plugin-calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.

Comments

@jcfranco
Copy link
Member

jcfranco commented Dec 28, 2024

Check existing issues

Description

This will help us integrate better with ESLint v9 since flat config is now the default (see https://eslint.org/blog/2024/04/eslint-v9.0.0-released/#flat-config-is-now-the-default-and-has-some-changes).

Acceptance Criteria

Flat configs are supported and used by the calcite-components package.

Relevant Info

#10938 enabled recommended rules to avoid using the current config, which produced the following error:

Oops! Something went wrong! :(

ESLint: 9.17.0

TypeError: Key "rules": Key "@esri/calcite-components/no-dynamic-createelement": Could not find plugin "@esri/calcite-components".
    at throwRuleNotFoundError (/example/path/to/project/node_modules/eslint/lib/config/rule-validator.js:66:11)
    at RuleValidator.validate (/example/path/to/project/node_modules/eslint/lib/config/rule-validator.js:147:17)
    at new Config (/example/path/to/project/node_modules/eslint/lib/config/config.js:228:27)
    at [finalizeConfig] (/example/path/to/project/node_modules/eslint/lib/config/flat-config-array.js:216:16)
    at FlatConfigArray.getConfigWithStatus (/example/path/to/project/node_modules/@eslint/config-array/dist/cjs/index.cjs:1178:55)
    at FlatConfigArray.getConfig (/example/path/to/project/node_modules/@eslint/config-array/dist/cjs/index.cjs:1196:15)
    at entryFilter (/example/path/to/project/node_modules/eslint/lib/eslint/eslint-helpers.js:282:40)
    at async NodeHfs.<anonymous> (file:///example/path/to/project/node_modules/@humanfs/core/src/hfs.js:574:24)
    at async NodeHfs.<anonymous> (file:///example/path/to/project/node_modules/@humanfs/core/src/hfs.js:604:6)
    at async NodeHfs.<anonymous> (file:///example/path/to/project/node_modules/@humanfs/core/src/hfs.js:604:6)

cc @benelan

Which Component

N/A

Example Use Case

No response

Priority impact

impact - p3 - not time sensitive

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

Calcite (dev)

@jcfranco jcfranco added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 28, 2024
@jcfranco jcfranco changed the title support ESLint's new flat config Support ESLint's new flat config Dec 28, 2024
@github-actions github-actions bot added Calcite (dev) Issues logged by Calcite developers. eslint-plugin-calcite-components Issues specific to the @esri/eslint-plugin-calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. Calcite (dev) Issues logged by Calcite developers. enhancement Issues tied to a new feature or request. eslint-plugin-calcite-components Issues specific to the @esri/eslint-plugin-calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

1 participant