ultracite 3.4.2 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/eslint.config.d.mts +11 -0
- package/dist/eslint.config.mjs +1 -1
- package/package.json +28 -23
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Ultracite is a robust linting preset for modern TypeScript apps. It's comprised
|
|
|
14
14
|
|
|
15
15
|
### ESLint
|
|
16
16
|
|
|
17
|
-
Ultracite uses [ESLint](https://eslint.org/) to enforce code quality and type safety. It includes a wide range of rules to ensure your code is consistent and error-free. Ultracite combines with pre-defined rulesets for ESLint, as well as the following plugins: [Import](https://www.npmjs.com/package/eslint-plugin-import), [jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y), [React](https://www.npmjs.com/package/eslint-plugin-react), [React Hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks), [jest](https://www.npmjs.com/package/eslint-plugin-jest), [promise](https://www.npmjs.com/package/eslint-plugin-promise), [n](https://www.npmjs.com/package/eslint-plugin-n), [Typescript](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin), [Prettier](https://www.npmjs.com/package/eslint-plugin-prettier), [Next.js](https://nextjs.org/docs/basic-features/eslint#eslint-plugin), [Cypress](https://www.npmjs.com/package/eslint-plugin-cypress) and [SonarJS](https://www.npmjs.com/package/eslint-plugin-sonarjs).
|
|
17
|
+
Ultracite uses [ESLint](https://eslint.org/) to enforce code quality and type safety. It includes a wide range of rules to ensure your code is consistent and error-free. Ultracite combines with pre-defined rulesets for ESLint, as well as the following plugins: [Import](https://www.npmjs.com/package/eslint-plugin-import), [jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y), [React](https://www.npmjs.com/package/eslint-plugin-react), [React Hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks), [jest](https://www.npmjs.com/package/eslint-plugin-jest), [promise](https://www.npmjs.com/package/eslint-plugin-promise), [n](https://www.npmjs.com/package/eslint-plugin-n), [Typescript](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin), [Prettier](https://www.npmjs.com/package/eslint-plugin-prettier), [Next.js](https://nextjs.org/docs/basic-features/eslint#eslint-plugin), [Cypress](https://www.npmjs.com/package/eslint-plugin-cypress), [HTML](https://www.npmjs.com/package/eslint-plugin-html) and [SonarJS](https://www.npmjs.com/package/eslint-plugin-sonarjs).
|
|
18
18
|
|
|
19
19
|
### Prettier
|
|
20
20
|
|
|
@@ -78,13 +78,15 @@ Ultracite is designed to be used with [VS Code](https://code.visualstudio.com/),
|
|
|
78
78
|
"[typescriptreact]": {
|
|
79
79
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
80
80
|
},
|
|
81
|
-
"eslint.useFlatConfig": true,
|
|
81
|
+
"eslint.experimental.useFlatConfig": true,
|
|
82
82
|
"eslint.options": {
|
|
83
83
|
"overrideConfigFile": "eslint.config.mjs"
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
+
> [!NOTE] If you are using the pre-release version of the ESLint extension, you may need to use `eslint.useFlatConfig` instead of `eslint.experimental.useFlatConfig`.
|
|
89
|
+
|
|
88
90
|
Lastly, ensure your `tsconfig.json` (if it exists) includes your new ESLint config and that `strictNullChecks` is enabled.
|
|
89
91
|
|
|
90
92
|
```json
|
|
@@ -130,8 +132,6 @@ If you see any errors, it could be related to peer dependencies or changes in de
|
|
|
130
132
|
|
|
131
133
|
## Roadmap
|
|
132
134
|
|
|
133
|
-
- https://github.com/SonarSource/eslint-plugin-sonarjs
|
|
134
|
-
- https://github.com/BenoitZugmeyer/eslint-plugin-html
|
|
135
135
|
- https://github.com/ota-meshi/eslint-plugin-yml
|
|
136
136
|
- https://github.com/mdx-js/eslint-mdx/tree/master/packages/eslint-plugin-mdx
|
|
137
137
|
- https://github.com/eslint/eslint-plugin-markdown
|
package/dist/eslint.config.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ import plugin$6 from 'eslint-plugin-cypress';
|
|
|
14
14
|
import plugin$7 from 'eslint-plugin-storybook';
|
|
15
15
|
import plugin$8 from 'eslint-plugin-unused-imports';
|
|
16
16
|
import * as importTypescriptResolver from 'eslint-import-resolver-typescript';
|
|
17
|
+
import html from 'eslint-plugin-html';
|
|
17
18
|
import eslintPrettier from 'eslint-config-prettier';
|
|
18
19
|
import * as typescriptParser from '@typescript-eslint/parser';
|
|
19
20
|
import plugin$9 from 'eslint-plugin-sonarjs';
|
|
@@ -593,6 +594,7 @@ const config = [
|
|
|
593
594
|
'**/*.json',
|
|
594
595
|
'**/*.mjs',
|
|
595
596
|
'**/*.cjs',
|
|
597
|
+
'**/*.html',
|
|
596
598
|
],
|
|
597
599
|
plugins: {
|
|
598
600
|
prettier,
|
|
@@ -697,6 +699,15 @@ const config = [
|
|
|
697
699
|
...config$3,
|
|
698
700
|
},
|
|
699
701
|
},
|
|
702
|
+
{
|
|
703
|
+
files: ['**/*.html'],
|
|
704
|
+
plugins: {
|
|
705
|
+
html,
|
|
706
|
+
},
|
|
707
|
+
settings: {
|
|
708
|
+
'html/javascript-tag-names': ['script', 'Script'],
|
|
709
|
+
},
|
|
710
|
+
},
|
|
700
711
|
];
|
|
701
712
|
|
|
702
713
|
export { config as default };
|
package/dist/eslint.config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import Br from"eslint-plugin-react";import Dr from"eslint-plugin-react-hooks";import Jr from"@typescript-eslint/eslint-plugin";import Mr from"eslint-plugin-jsx-a11y";import*as o from"eslint-plugin-import";import Nr from"eslint-plugin-jest";import Ur from"eslint-plugin-promise";import Xr from"eslint-plugin-n";import Yr from"@next/eslint-plugin-next";import e from"globals";import Zr from"eslint-plugin-prettier";import re from"eslint-plugin-cypress";import ee from"eslint-plugin-storybook";import oe from"eslint-plugin-unused-imports";import*as te from"eslint-import-resolver-typescript";import se from"eslint-config-prettier";import*as ne from"@typescript-eslint/parser";import ie from"eslint-plugin-sonarjs";var A={"array-callback-return":"error","constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-dupe-args":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-fallthrough":"error","no-func-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-misleading-character-class":"error","no-new-symbol":"error","no-obj-calls":"error","no-promise-executor-return":"error","no-prototype-builtins":"error","no-self-assign":"error","no-self-compare":"error","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-undef":"error","no-unmodified-loop-condition":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-private-class-members":"off","no-useless-backreference":"error","require-atomic-updates":"error","use-isnan":"error","valid-typeof":"error","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"error","consistent-this":"error",curly:"error","default-case":"error","default-case-last":"error",eqeqeq:"error","func-name-matching":"error","func-names":"error","func-style":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":["error",{exceptions:["x","y","z"]}],"id-match":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"error","max-params":"off","max-statements":"off","multiline-comment-style":"error","new-cap":"error","no-alert":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-console":"error","no-continue":"error","no-delete-var":"error","no-div-regex":"error","no-else-return":"error","no-empty":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-inline-comments":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-object":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-proto":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-ternary":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"error","no-unneeded-ternary":"error","no-unused-labels":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":["error",{array:!1,object:!0}],"prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"off","sort-keys":"off","sort-vars":"off","spaced-comment":"error",strict:"error","symbol-description":"error","vars-on-top":"error",yoda:"error","line-comment-position":"error"},t=A;import z from"eslint-plugin-react";var{rules:s}=z,H=Object.keys(s).filter(r=>!s[r].meta.deprecated),I=Object.fromEntries(H.map(r=>[`react/${r}`,"error"])),F={"react/forbid-component-props":"off","react/function-component-definition":["error",{namedComponents:"arrow-function"}],"react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"off","react/no-invalid-html-attribute":"off","react/no-multi-comp":"off","react/no-unused-class-component-methods":"off","react/react-in-jsx-scope":"off","react/require-default-props":"off","react/jsx-filename-extension":["error",{extensions:[".tsx"]}],"react/jsx-max-depth":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-no-bind":"off","react/jsx-no-literals":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-spreading":"off","react/jsx-sort-props":"off"},G=Object.assign(I,F),n=G;import{rules as i}from"eslint-plugin-react-hooks";var L=Object.keys(i).filter(r=>!i[r].meta.deprecated),S=Object.fromEntries(L.map(r=>[`react-hooks/${r}`,"error"])),Q={"react-hooks/exhaustive-deps":["error",{additionalHooks:"(useAsync)"}]},V=Object.assign(S,Q),a=V;import W from"@typescript-eslint/eslint-plugin";var{rules:c}=W,_=Object.keys(c).filter(r=>!c[r].meta.deprecated),B=Object.fromEntries(_.map(r=>[`@typescript-eslint/${r}`,"error"])),D={"@typescript-eslint/consistent-type-definitions":["error","type"],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/naming-convention":["error",{selector:"default",format:["camelCase","PascalCase","snake_case"]},{selector:"objectLiteralProperty",format:null,modifiers:["requiresQuotes"]}],"@typescript-eslint/no-confusing-void-expression":"off","@typescript-eslint/no-misused-promises":"off","@typescript-eslint/no-type-alias":"off","@typescript-eslint/prefer-readonly":"off","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/sort-type-union-intersection-members":"off","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/no-magic-numbers":"off","@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":"off","@typescript-eslint/lines-between-class-members":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/padding-line-between-statements":"off","@typescript-eslint/quotes":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"},J=Object.assign(B,D),f=J;import M from"eslint-plugin-jsx-a11y";var{rules:p}=M,N=Object.keys(p).filter(r=>!p[r].meta.deprecated),U=Object.fromEntries(N.map(r=>[`jsx-a11y/${r}`,"error"])),X={"jsx-a11y/no-autofocus":"off","jsx-a11y/label-has-associated-control":["error",{labelComponents:["Label"],controlComponents:["Input","Select","Textarea","Checkbox","Radio"],depth:3}]},Y=Object.assign(U,X),l=Y;import{rules as m}from"eslint-plugin-import";var Z=Object.keys(m).filter(r=>!m[r].meta.deprecated),rr=Object.fromEntries(Z.map(r=>[`import/${r}`,"error"])),er={"import/no-unresolved":"off","import/no-internal-modules":"off","import/no-relative-parent-imports":"off","import/no-named-as-default":"off","import/exports-last":"off","import/no-namespace":"off","import/extensions":"off","import/order":["error",{groups:["builtin","external","internal","parent","sibling","index","object","type"]}],"import/prefer-default-export":"off","import/max-dependencies":"off","import/no-unassigned-import":"off","import/no-default-export":"off","import/no-named-export":"off","import/group-exports":"off"},or=Object.assign(rr,er),u=or;import tr from"eslint-plugin-jest";var{rules:d}=tr,sr=Object.keys(d).filter(r=>!d[r].meta.deprecated),nr=Object.fromEntries(sr.map(r=>[`jest/${r}`,"error"])),ir={},ar=Object.assign(nr,ir),y=ar;import cr from"eslint-plugin-promise";var{rules:b}=cr,fr=Object.keys(b).filter(r=>!b[r].meta.deprecated),pr=Object.fromEntries(fr.map(r=>[`promise/${r}`,"error"])),lr={"promise/catch-or-return":["error",{allowFinally:!0}],"promise/no-native":"off"},mr=Object.assign(pr,lr),g=mr;import ur from"eslint-plugin-n";var{rules:x}=ur,dr=Object.keys(x).filter(r=>!x[r].meta.deprecated),yr=Object.fromEntries(dr.map(r=>[`n/${r}`,"error"])),br={"n/no-missing-import":"off","n/no-unsupported-features/es-builtins":"off","n/no-unsupported-features/es-syntax":"off","n/no-unsupported-features/node-builtins":"off","n/file-extension-in-import":"off","n/no-process-env":"off"},gr=Object.assign(yr,br),j=gr;import xr from"@next/eslint-plugin-next";var{rules:v}=xr,jr=Object.keys(v).filter(r=>!v[r].meta.deprecated),vr=Object.fromEntries(jr.map(r=>[`@next/next/${r}`,"error"])),Or={},Rr=Object.assign(vr,Or),O=Rr;var kr={"prettier/prettier":"error"},R=kr;var hr={"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","default-param-last":"off","dot-notation":"off","func-call-spacing":"off",indent:"off","init-declarations":"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off","no-dupe-class-members":"off","no-duplicate-imports":"off","no-empty-function":"off","no-extra-parens":"off","no-extra-semi":"off","no-implied-eval":"off","no-invalid-this":"off","no-loop-func":"off","no-loss-of-precision":"off","no-magic-numbers":"off","no-redeclare":"off","no-restricted-imports":"off","no-shadow":"off","no-throw-literal":"off","no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-constructor":"off","object-curly-spacing":"off","padding-line-between-statements":"off",quotes:"off","require-await":"off","no-return-await":"off",semi:"off","space-before-function-paren":"off","space-infix-ops":"off"},k=hr;import wr from"eslint-plugin-cypress";var{rules:h}=wr,qr=Object.keys(h).filter(r=>!h[r].meta.deprecated),Er=Object.fromEntries(qr.map(r=>[`cypress/${r}`,"error"])),Kr={},$r=Object.assign(Er,Kr),w=$r;import Cr from"eslint-plugin-storybook";var{rules:q}=Cr,Pr=Object.keys(q).filter(r=>!q[r].meta.deprecated),Tr=Object.fromEntries(Pr.map(r=>[`storybook/${r}`,"error"])),Ar={},zr=Object.assign(Tr,Ar),E=zr;import Hr from"eslint-plugin-unused-imports";var{rules:K}=Hr,Ir=Object.keys(K).filter(r=>!K[r].meta.deprecated),Fr=Object.fromEntries(Ir.map(r=>[`unused-imports/${r}`,"error"])),Gr={},Lr=Object.assign(Fr,Gr),$=Lr;import Sr from"eslint-plugin-sonarjs";var{rules:C}=Sr,Qr=Object.keys(C).filter(r=>!C[r].meta.deprecated),Vr=Object.fromEntries(Qr.map(r=>[`sonarjs/${r}`,"error"])),Wr={},_r=Object.assign(Vr,Wr),P=_r;var T={...e.browser};delete T["AudioWorkletGlobalScope "];var ae=[o.configs.typescript,{languageOptions:{sourceType:"module",globals:{...T,...e.node},parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}}},files:["**/*.js","**/*.jsx","**/*.ts","**/*.tsx","**/*.json","**/*.mjs","**/*.cjs"],plugins:{prettier:Zr,react:Br,"react-hooks":Dr,"jsx-a11y":Mr,import:o,promise:Ur,n:Xr,"@next/next":Yr,"unused-imports":oe,sonarjs:ie},rules:{...t,...n,...a,...l,...u,...g,...j,...O,...R,...se.rules,...$,...P},settings:{react:{version:"detect"},"import/parsers":{espree:[".js",".cjs",".mjs",".jsx",".ts",".tsx"]},"import/resolver":{typescript:!0,node:!0}}},{files:["**/*.ts","**/*.tsx"],languageOptions:{parser:ne,parserOptions:{project:"./tsconfig.json"}},plugins:{"@typescript-eslint":Jr,"import/typescript":te},rules:{...k,...f}},{files:["**/*.test.js","**/*.test.jsx","tests/**/*.js","tests/**/*.jsx"],languageOptions:{globals:{...e.jest}},plugins:{jest:Nr},rules:{...y}},{files:["**/*.cy.js","**/*.cy.jsx"],languageOptions:{globals:{...e.cypress}},plugins:{cypress:re},rules:{...w}},{files:["**/*.stories.js","**/*.stories.jsx","**/*.stories.ts","**/*.stories.tsx"],plugins:{storybook:ee},rules:{...E}}],yo=ae;export{yo as default};
|
|
1
|
+
import Br from"eslint-plugin-react";import Dr from"eslint-plugin-react-hooks";import Jr from"@typescript-eslint/eslint-plugin";import Mr from"eslint-plugin-jsx-a11y";import*as o from"eslint-plugin-import";import Nr from"eslint-plugin-jest";import Ur from"eslint-plugin-promise";import Xr from"eslint-plugin-n";import Yr from"@next/eslint-plugin-next";import e from"globals";import Zr from"eslint-plugin-prettier";import re from"eslint-plugin-cypress";import ee from"eslint-plugin-storybook";import oe from"eslint-plugin-unused-imports";import*as te from"eslint-import-resolver-typescript";import se from"eslint-plugin-html";import ne from"eslint-config-prettier";import*as ie from"@typescript-eslint/parser";import ae from"eslint-plugin-sonarjs";var A={"array-callback-return":"error","constructor-super":"error","for-direction":"error","getter-return":"error","no-async-promise-executor":"error","no-await-in-loop":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-dupe-args":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-ex-assign":"error","no-fallthrough":"error","no-func-assign":"error","no-import-assign":"error","no-inner-declarations":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-misleading-character-class":"error","no-new-symbol":"error","no-obj-calls":"error","no-promise-executor-return":"error","no-prototype-builtins":"error","no-self-assign":"error","no-self-compare":"error","no-setter-return":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-undef":"error","no-unmodified-loop-condition":"error","no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-private-class-members":"off","no-useless-backreference":"error","require-atomic-updates":"error","use-isnan":"error","valid-typeof":"error","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"error","consistent-this":"error",curly:"error","default-case":"error","default-case-last":"error",eqeqeq:"error","func-name-matching":"error","func-names":"error","func-style":"error","grouped-accessor-pairs":"error","guard-for-in":"error","id-denylist":"error","id-length":["error",{exceptions:["x","y","z"]}],"id-match":"error","max-classes-per-file":"error","max-depth":"error","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"error","max-params":"off","max-statements":"off","multiline-comment-style":"error","new-cap":"error","no-alert":"error","no-bitwise":"error","no-caller":"error","no-case-declarations":"error","no-console":"error","no-continue":"error","no-delete-var":"error","no-div-regex":"error","no-else-return":"error","no-empty":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-label":"error","no-global-assign":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-inline-comments":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-object":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-plusplus":"error","no-proto":"error","no-regex-spaces":"error","no-restricted-exports":"error","no-restricted-globals":"error","no-restricted-properties":"error","no-restricted-syntax":"error","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-ternary":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"error","no-unneeded-ternary":"error","no-unused-labels":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-warning-comments":"error","no-with":"error","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":["error",{array:!1,object:!0}],"prefer-exponentiation-operator":"error","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"error","require-unicode-regexp":"error","require-yield":"error","sort-imports":"off","sort-keys":"off","sort-vars":"off","spaced-comment":"error",strict:"error","symbol-description":"error","vars-on-top":"error",yoda:"error","line-comment-position":"error"},t=A;import z from"eslint-plugin-react";var{rules:s}=z,H=Object.keys(s).filter(r=>!s[r].meta.deprecated),I=Object.fromEntries(H.map(r=>[`react/${r}`,"error"])),S={"react/forbid-component-props":"off","react/function-component-definition":["error",{namedComponents:"arrow-function"}],"react/no-array-index-key":"off","react/no-arrow-function-lifecycle":"off","react/no-invalid-html-attribute":"off","react/no-multi-comp":"off","react/no-unused-class-component-methods":"off","react/react-in-jsx-scope":"off","react/require-default-props":"off","react/jsx-filename-extension":["error",{extensions:[".tsx"]}],"react/jsx-max-depth":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-no-bind":"off","react/jsx-no-literals":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-spreading":"off","react/jsx-sort-props":"off"},F=Object.assign(I,S),n=F;import{rules as i}from"eslint-plugin-react-hooks";var G=Object.keys(i).filter(r=>!i[r].meta.deprecated),L=Object.fromEntries(G.map(r=>[`react-hooks/${r}`,"error"])),Q={"react-hooks/exhaustive-deps":["error",{additionalHooks:"(useAsync)"}]},V=Object.assign(L,Q),a=V;import W from"@typescript-eslint/eslint-plugin";var{rules:c}=W,_=Object.keys(c).filter(r=>!c[r].meta.deprecated),B=Object.fromEntries(_.map(r=>[`@typescript-eslint/${r}`,"error"])),D={"@typescript-eslint/consistent-type-definitions":["error","type"],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/naming-convention":["error",{selector:"default",format:["camelCase","PascalCase","snake_case"]},{selector:"objectLiteralProperty",format:null,modifiers:["requiresQuotes"]}],"@typescript-eslint/no-confusing-void-expression":"off","@typescript-eslint/no-misused-promises":"off","@typescript-eslint/no-type-alias":"off","@typescript-eslint/prefer-readonly":"off","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/sort-type-union-intersection-members":"off","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/no-magic-numbers":"off","@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/lines-around-comment":"off","@typescript-eslint/lines-between-class-members":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/padding-line-between-statements":"off","@typescript-eslint/quotes":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"},J=Object.assign(B,D),p=J;import M from"eslint-plugin-jsx-a11y";var{rules:f}=M,N=Object.keys(f).filter(r=>!f[r].meta.deprecated),U=Object.fromEntries(N.map(r=>[`jsx-a11y/${r}`,"error"])),X={"jsx-a11y/no-autofocus":"off","jsx-a11y/label-has-associated-control":["error",{labelComponents:["Label"],controlComponents:["Input","Select","Textarea","Checkbox","Radio"],depth:3}]},Y=Object.assign(U,X),l=Y;import{rules as m}from"eslint-plugin-import";var Z=Object.keys(m).filter(r=>!m[r].meta.deprecated),rr=Object.fromEntries(Z.map(r=>[`import/${r}`,"error"])),er={"import/no-unresolved":"off","import/no-internal-modules":"off","import/no-relative-parent-imports":"off","import/no-named-as-default":"off","import/exports-last":"off","import/no-namespace":"off","import/extensions":"off","import/order":["error",{groups:["builtin","external","internal","parent","sibling","index","object","type"]}],"import/prefer-default-export":"off","import/max-dependencies":"off","import/no-unassigned-import":"off","import/no-default-export":"off","import/no-named-export":"off","import/group-exports":"off"},or=Object.assign(rr,er),u=or;import tr from"eslint-plugin-jest";var{rules:d}=tr,sr=Object.keys(d).filter(r=>!d[r].meta.deprecated),nr=Object.fromEntries(sr.map(r=>[`jest/${r}`,"error"])),ir={},ar=Object.assign(nr,ir),y=ar;import cr from"eslint-plugin-promise";var{rules:b}=cr,pr=Object.keys(b).filter(r=>!b[r].meta.deprecated),fr=Object.fromEntries(pr.map(r=>[`promise/${r}`,"error"])),lr={"promise/catch-or-return":["error",{allowFinally:!0}],"promise/no-native":"off"},mr=Object.assign(fr,lr),g=mr;import ur from"eslint-plugin-n";var{rules:x}=ur,dr=Object.keys(x).filter(r=>!x[r].meta.deprecated),yr=Object.fromEntries(dr.map(r=>[`n/${r}`,"error"])),br={"n/no-missing-import":"off","n/no-unsupported-features/es-builtins":"off","n/no-unsupported-features/es-syntax":"off","n/no-unsupported-features/node-builtins":"off","n/file-extension-in-import":"off","n/no-process-env":"off"},gr=Object.assign(yr,br),j=gr;import xr from"@next/eslint-plugin-next";var{rules:v}=xr,jr=Object.keys(v).filter(r=>!v[r].meta.deprecated),vr=Object.fromEntries(jr.map(r=>[`@next/next/${r}`,"error"])),Or={},Rr=Object.assign(vr,Or),O=Rr;var kr={"prettier/prettier":"error"},R=kr;var hr={"brace-style":"off",camelcase:"off","comma-dangle":"off","comma-spacing":"off","default-param-last":"off","dot-notation":"off","func-call-spacing":"off",indent:"off","init-declarations":"off","keyword-spacing":"off","lines-between-class-members":"off","no-array-constructor":"off","no-dupe-class-members":"off","no-duplicate-imports":"off","no-empty-function":"off","no-extra-parens":"off","no-extra-semi":"off","no-implied-eval":"off","no-invalid-this":"off","no-loop-func":"off","no-loss-of-precision":"off","no-magic-numbers":"off","no-redeclare":"off","no-restricted-imports":"off","no-shadow":"off","no-throw-literal":"off","no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-constructor":"off","object-curly-spacing":"off","padding-line-between-statements":"off",quotes:"off","require-await":"off","no-return-await":"off",semi:"off","space-before-function-paren":"off","space-infix-ops":"off"},k=hr;import wr from"eslint-plugin-cypress";var{rules:h}=wr,qr=Object.keys(h).filter(r=>!h[r].meta.deprecated),Er=Object.fromEntries(qr.map(r=>[`cypress/${r}`,"error"])),Kr={},$r=Object.assign(Er,Kr),w=$r;import Cr from"eslint-plugin-storybook";var{rules:q}=Cr,Pr=Object.keys(q).filter(r=>!q[r].meta.deprecated),Tr=Object.fromEntries(Pr.map(r=>[`storybook/${r}`,"error"])),Ar={},zr=Object.assign(Tr,Ar),E=zr;import Hr from"eslint-plugin-unused-imports";var{rules:K}=Hr,Ir=Object.keys(K).filter(r=>!K[r].meta.deprecated),Sr=Object.fromEntries(Ir.map(r=>[`unused-imports/${r}`,"error"])),Fr={},Gr=Object.assign(Sr,Fr),$=Gr;import Lr from"eslint-plugin-sonarjs";var{rules:C}=Lr,Qr=Object.keys(C).filter(r=>!C[r].meta.deprecated),Vr=Object.fromEntries(Qr.map(r=>[`sonarjs/${r}`,"error"])),Wr={},_r=Object.assign(Vr,Wr),P=_r;var T={...e.browser};delete T["AudioWorkletGlobalScope "];var ce=[o.configs.typescript,{languageOptions:{sourceType:"module",globals:{...T,...e.node},parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}}},files:["**/*.js","**/*.jsx","**/*.ts","**/*.tsx","**/*.json","**/*.mjs","**/*.cjs","**/*.html"],plugins:{prettier:Zr,react:Br,"react-hooks":Dr,"jsx-a11y":Mr,import:o,promise:Ur,n:Xr,"@next/next":Yr,"unused-imports":oe,sonarjs:ae},rules:{...t,...n,...a,...l,...u,...g,...j,...O,...R,...ne.rules,...$,...P},settings:{react:{version:"detect"},"import/parsers":{espree:[".js",".cjs",".mjs",".jsx",".ts",".tsx"]},"import/resolver":{typescript:!0,node:!0}}},{files:["**/*.ts","**/*.tsx"],languageOptions:{parser:ie,parserOptions:{project:"./tsconfig.json"}},plugins:{"@typescript-eslint":Jr,"import/typescript":te},rules:{...k,...p}},{files:["**/*.test.js","**/*.test.jsx","tests/**/*.js","tests/**/*.jsx"],languageOptions:{globals:{...e.jest}},plugins:{jest:Nr},rules:{...y}},{files:["**/*.cy.js","**/*.cy.jsx"],languageOptions:{globals:{...e.cypress}},plugins:{cypress:re},rules:{...w}},{files:["**/*.stories.js","**/*.stories.jsx","**/*.stories.ts","**/*.stories.tsx"],plugins:{storybook:ee},rules:{...E}},{files:["**/*.html"],plugins:{html:se},settings:{"html/javascript-tag-names":["script","Script"]}}],go=ce;export{go as default};
|
package/package.json
CHANGED
|
@@ -1,47 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dependencies": {
|
|
3
|
-
"@next/eslint-plugin-next": "^14.
|
|
4
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
5
|
-
"@typescript-eslint/parser": "^
|
|
3
|
+
"@next/eslint-plugin-next": "^14.2.3",
|
|
4
|
+
"@typescript-eslint/eslint-plugin": "^7.11.0",
|
|
5
|
+
"@typescript-eslint/parser": "^7.11.0",
|
|
6
6
|
"eslint-config-prettier": "^9.1.0",
|
|
7
7
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
8
|
-
"eslint-plugin-cypress": "^2.
|
|
9
|
-
"eslint-plugin-
|
|
10
|
-
"eslint-plugin-
|
|
8
|
+
"eslint-plugin-cypress": "^3.2.0",
|
|
9
|
+
"eslint-plugin-html": "^8.1.1",
|
|
10
|
+
"eslint-plugin-import": "^2.29.1",
|
|
11
|
+
"eslint-plugin-jest": "^28.5.0",
|
|
11
12
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
12
|
-
"eslint-plugin-n": "^
|
|
13
|
-
"eslint-plugin-prettier": "^5.
|
|
14
|
-
"eslint-plugin-promise": "^6.
|
|
15
|
-
"eslint-plugin-react": "^7.
|
|
16
|
-
"eslint-plugin-react-hooks": "^4.6.
|
|
13
|
+
"eslint-plugin-n": "^17.7.0",
|
|
14
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
15
|
+
"eslint-plugin-promise": "^6.2.0",
|
|
16
|
+
"eslint-plugin-react": "^7.34.1",
|
|
17
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
17
18
|
"eslint-plugin-sonarjs": "^1.0.3",
|
|
18
|
-
"eslint-plugin-storybook": "^0.
|
|
19
|
-
"eslint-plugin-tailwindcss": "^3.
|
|
20
|
-
"eslint-plugin-unused-imports": "^
|
|
21
|
-
"globals": "^
|
|
22
|
-
"prettier-plugin-tailwindcss": "^0.5.
|
|
19
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
20
|
+
"eslint-plugin-tailwindcss": "^3.17.0",
|
|
21
|
+
"eslint-plugin-unused-imports": "^4.0.0",
|
|
22
|
+
"globals": "^15.3.0",
|
|
23
|
+
"prettier-plugin-tailwindcss": "^0.5.14",
|
|
23
24
|
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
24
|
-
"stylelint-config-standard": "^
|
|
25
|
+
"stylelint-config-standard": "^36.0.0",
|
|
25
26
|
"stylelint-prettier": "^5.0.0",
|
|
26
27
|
"tsup": "^8.0.2"
|
|
27
28
|
},
|
|
28
29
|
"peerDependencies": {
|
|
29
|
-
"eslint": "
|
|
30
|
+
"eslint": "8.56.0",
|
|
30
31
|
"jest": "^29.7.0",
|
|
31
32
|
"prettier": "^3.1.1",
|
|
32
33
|
"stylelint": "^16.0.2",
|
|
33
34
|
"typescript": "^5.3.3"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
|
-
"
|
|
37
|
+
"@types/react": "^18.3.3",
|
|
38
|
+
"@types/react-dom": "^18.3.0",
|
|
39
|
+
"eslint": "8.56.0",
|
|
37
40
|
"jest": "^29.7.0",
|
|
38
|
-
"prettier": "^3.
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
+
"prettier": "^3.2.5",
|
|
42
|
+
"react": "^18.3.1",
|
|
43
|
+
"react-dom": "^18.3.1",
|
|
44
|
+
"stylelint": "^16.6.0",
|
|
45
|
+
"typescript": "^5.4.5"
|
|
41
46
|
},
|
|
42
47
|
"name": "ultracite",
|
|
43
48
|
"description": "Strict, opinionated ESLint config for modern TypeScript apps.",
|
|
44
|
-
"version": "3.
|
|
49
|
+
"version": "3.5.1",
|
|
45
50
|
"publishConfig": {
|
|
46
51
|
"access": "public",
|
|
47
52
|
"registry": "https://registry.npmjs.org/"
|