-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2073 from umbraco/dependabot/npm_and_yarn/eslint-…
…9.6.0 Bump eslint from 8.57.0 to 9.6.0
- Loading branch information
Showing
338 changed files
with
3,176 additions
and
2,375 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# Ignore auto-generated backend-api files | ||
src/external/backend-api/src | ||
src/packages/core/icon-registry/icons.ts | ||
src/packages/core/icon-registry/icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import js from "@eslint/js"; | ||
import globals from "globals"; | ||
import importPlugin from "eslint-plugin-import"; | ||
import localRules from "eslint-plugin-local-rules"; | ||
import wcPlugin from "eslint-plugin-wc"; | ||
import litPlugin from "eslint-plugin-lit"; | ||
import litA11yPlugin from "eslint-plugin-lit-a11y"; | ||
import storybookPlugin from "eslint-plugin-storybook"; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default [ | ||
// Recommended config applied to all files | ||
js.configs.recommended, | ||
...tseslint.configs.recommended, | ||
eslintPluginPrettierRecommended, | ||
|
||
// Global ignores | ||
{ | ||
ignores: [ | ||
"**/rollup.config.js", | ||
"**/vite.config.ts", | ||
"src/external", | ||
"src/packages/core/icon-registry/icons", | ||
"src/packages/core/icon-registry/icons.ts" | ||
], | ||
}, | ||
|
||
// Global config | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
globals: { | ||
...globals.browser, | ||
} | ||
}, | ||
plugins: { | ||
import: importPlugin, | ||
"local-rules": localRules, | ||
"wc": wcPlugin, | ||
"lit": litPlugin, | ||
"lit-a11y": litA11yPlugin, | ||
"storybook": storybookPlugin | ||
}, | ||
rules: { | ||
semi: ["warn", "always"], | ||
"no-unused-vars": "warn", | ||
"no-var": "error", | ||
"import/no-unresolved": "off", | ||
"import/order": ["warn", { "groups": ["builtin", "parent", "sibling", "index", "external"] }], | ||
"import/no-self-import": "error", | ||
"import/no-cycle": ["error", { "maxDepth": 6, "allowUnsafeDynamicCyclicDependency": true }], | ||
"local-rules/bad-type-import": "error", | ||
"local-rules/enforce-element-suffix-on-element-class-name": "error", | ||
"local-rules/enforce-umb-prefix-on-element-name": "error", | ||
"local-rules/ensure-relative-import-use-js-extension": "error", | ||
"local-rules/no-direct-api-import": "warn", | ||
"local-rules/prefer-import-aliases": "error", | ||
"local-rules/prefer-static-styles-last": "warn", | ||
"local-rules/umb-class-prefix": "error", | ||
"local-rules/no-relative-import-to-import-map-module": "error", | ||
"local-rules/enforce-umbraco-external-imports": [ | ||
"error", | ||
{ | ||
"exceptions": ["@umbraco-cms", "@open-wc/testing", "@storybook", "msw", ".", "vite"] | ||
} | ||
], | ||
"local-rules/exported-string-constant-naming": [ | ||
"error", | ||
{ | ||
"excludedFileNames": ["umbraco-package", "input-tiny-mce.defaults"] // TODO: what to do about the tiny mce defaults? | ||
} | ||
], | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-explicit-any": "warn", | ||
"@typescript-eslint/no-unused-vars": "warn", | ||
"@typescript-eslint/consistent-type-exports": "error", | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/no-import-type-side-effects": "warn" | ||
} | ||
}, | ||
|
||
// Pattern-specific overrides | ||
{ | ||
files: ['**/*.js'], | ||
...tseslint.configs.disableTypeChecked, | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
} | ||
} | ||
}, | ||
]; |
Oops, something went wrong.