@eslint-sukka/react 7.1.2 → 7.2.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/dist/index.cjs +400 -1
- package/package.json +6 -8
- package/dist/index.mjs +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eslint-sukka/react",
|
|
3
|
-
"version": "7.1
|
|
3
|
+
"version": "7.2.1",
|
|
4
4
|
"description": "Sukka's ESLint config",
|
|
5
5
|
"homepage": "https://github.com/SukkaW/eslint-config-sukka",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"directory": "packages/react"
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/index.cjs",
|
|
11
|
-
"module": "dist/index.mjs",
|
|
12
11
|
"types": "dist/index.d.ts",
|
|
13
12
|
"files": [
|
|
14
13
|
"dist"
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
"exports": {
|
|
17
16
|
".": {
|
|
18
17
|
"types": "./dist/index.d.ts",
|
|
19
|
-
"import": "./dist/index.mjs",
|
|
20
18
|
"require": "./dist/index.cjs",
|
|
21
19
|
"default": "./dist/index.cjs"
|
|
22
20
|
},
|
|
@@ -28,7 +26,6 @@
|
|
|
28
26
|
"author": "Sukka <https://skk.moe>",
|
|
29
27
|
"license": "MIT",
|
|
30
28
|
"dependencies": {
|
|
31
|
-
"@eslint-react/eslint-plugin": "^1.53.1",
|
|
32
29
|
"@eslint/compat": "^1.4.0",
|
|
33
30
|
"@next/eslint-plugin-next": "^15.5.4",
|
|
34
31
|
"@stylexjs/eslint-plugin": "^0.15.4",
|
|
@@ -36,13 +33,14 @@
|
|
|
36
33
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
37
34
|
"eslint-plugin-react-refresh": "^0.4.22",
|
|
38
35
|
"eslint-plugin-ssr-friendly": "^1.3.0",
|
|
39
|
-
"@eslint-sukka/
|
|
40
|
-
"@eslint-sukka/eslint-plugin-stylistic": "7.1
|
|
41
|
-
"@eslint-sukka/
|
|
36
|
+
"@eslint-sukka/eslint-plugin-react-jsx-a11y": "7.2.1",
|
|
37
|
+
"@eslint-sukka/eslint-plugin-stylistic": "7.2.1",
|
|
38
|
+
"@eslint-sukka/shared": "7.2.1"
|
|
42
39
|
},
|
|
43
40
|
"devDependencies": {
|
|
41
|
+
"@eslint-react/eslint-plugin": "^2.0.1",
|
|
44
42
|
"eslint-plugin-react-prefer-function-component": "^4.0.1",
|
|
45
|
-
"@eslint-sukka/rollup-config": "7.1
|
|
43
|
+
"@eslint-sukka/rollup-config": "7.2.1"
|
|
46
44
|
},
|
|
47
45
|
"scripts": {
|
|
48
46
|
"build": "rollup -c rollup.config.ts --configPlugin swc3"
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{constants as e,memo as n,globals as r}from"@eslint-sukka/shared";import{flatConfig as t}from"@next/eslint-plugin-next";import{eslint_plugin_jsx_a11y_minimal as s}from"@eslint-sukka/eslint-plugin-react-jsx-a11y";import o from"eslint-plugin-react-hooks";import a from"eslint-plugin-react-compiler";import i from"eslint-plugin-react-refresh";import l from"@eslint-react/eslint-plugin";import{stylistic_eslint_plugin as c}from"@eslint-sukka/eslint-plugin-stylistic";import p from"eslint-plugin-ssr-friendly";import{fixupPluginRules as m}from"@eslint/compat";function u(){return[{...t.coreWebVitals,files:[e.GLOB_TS,e.GLOB_TSX,e.GLOB_JSX],rules:{...t.coreWebVitals.rules,"@next/next/no-img-element":"off"}}]}var d,f,g,y={exports:{}},x={},C=y.exports,h=(d=function(){if(g)return y.exports;g=1;var e=C&&C.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};return Object.defineProperty(C,"__esModule",{value:!0}),y.exports={configs:{recommended:{plugins:["react-prefer-function-component"],rules:{"react-prefer-function-component/react-prefer-function-component":"error"}}},rules:{"react-prefer-function-component":e(function(){let e;return f?x:(f=1,Object.defineProperty(x,"__esModule",{value:!0}),x.ALLOW_JSX_UTILITY_CLASS=x.ALLOW_COMPONENT_DID_CATCH=x.COMPONENT_SHOULD_BE_FUNCTION=void 0,x.COMPONENT_SHOULD_BE_FUNCTION="componentShouldBeFunction",x.ALLOW_COMPONENT_DID_CATCH="allowComponentDidCatch",x.ALLOW_JSX_UTILITY_CLASS="allowJsxUtilityClass",e={meta:{docs:{description:"Enforce components are written as function components",category:"Stylistic Issues",recommended:!1,url:"https://github.com/tatethurston/eslint-plugin-react-prefer-function-component#rule-details"},type:"problem",messages:{[x.COMPONENT_SHOULD_BE_FUNCTION]:"Class component should be written as a function"},schema:[{type:"object",properties:{[x.ALLOW_COMPONENT_DID_CATCH]:{default:!0,type:"boolean"},[x.ALLOW_JSX_UTILITY_CLASS]:{default:!1,type:"boolean"}},additionalProperties:!1}]},create(e){var n,r,t;let s=null!=(n=e.options[0])?n:{},o=null==(r=s.allowComponentDidCatch)||r,a=null!=(t=s.allowJsxUtilityClass)&&t,i=new Set;function l(e){e.body.body.some(e=>{if("key"in e&&"name"in e.key)return"componentDidCatch"===e.key.name})&&o||i.add(e)}function c(e){a||l(e)}return{"ClassDeclaration:has(JSXElement)":c,"ClassDeclaration:has(JSXFragment)":c,"ClassExpression:has(JSXElement)":c,"ClassExpression:has(JSXFragment)":c,"ClassDeclaration:has(JSXElement):has(MethodDefinition[key.name='render'])":l,"ClassDeclaration:has(JSXFragment):has(MethodDefinition[key.name='render'])":l,"ClassExpression:has(JSXElement):has(MethodDefinition[key.name='render'])":l,"ClassExpression:has(JSXFragment):has(MethodDefinition[key.name='render'])":l,"ClassDeclaration[superClass.object.name='React'][superClass.property.name='Component']":l,"ClassDeclaration[superClass.object.name='React'][superClass.property.name='PureComponent']":l,"ClassDeclaration[superClass.name='Component']":l,"ClassDeclaration[superClass.name='PureComponent']":l,"ClassExpression[superClass.object.name='React'][superClass.property.name='Component']":l,"ClassExpression[superClass.object.name='React'][superClass.property.name='PureComponent']":l,"ClassExpression[superClass.name='Component']":l,"ClassExpression[superClass.name='PureComponent']":l,"Program:exit":function(){i.forEach(n=>{var r;switch(n.type){case"ClassDeclaration":case"ClassExpression":return e.report({node:null!=(r=n.id)?r:n,messageId:x.COMPONENT_SHOULD_BE_FUNCTION})}})}}}},x.default=e,x)}()).default}},y.exports}())&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d;let _=n(l,"@eslint-react/eslint-plugin"),w=n(m(p),"eslint-plugin-ssr-friendly");function j({reactCompiler:t="error",additionalHooks:l="(useIsomorphicLayoutEffect|useSukkaManyOtherCustomEffectHookExample)",nextjs:p=!1,remix:m=!1,reactRefresh:u={},additionalHooksWithType:d={useLayoutEffect:["useIsomorphicLayoutEffect"],useEffect:["useAbortableEffect"]},additionalComponents:f=[{name:"Link",as:"a",attributes:[{name:"to",as:"href"},{name:"rel",as:"rel"}]}]}={}){let{allowConstantExport:g=!1}=u;return[{name:"@eslint-sukka/react base",files:[e.GLOB_TS,e.GLOB_TSX,e.GLOB_JSX],plugins:{"jsx-a11y-minimal":n(s,"@eslint-sukka/eslint-plugin-react-jsx-a11y#eslint_plugin_jsx_a11y_minimal"),"react-hooks":n(o,"eslint-plugin-react-hooks"),"@stylistic":n(c,"@stylistic/eslint-plugin"),"react-prefer-function-component":n(h,"eslint-plugin-react-prefer-function-component"),"react-compiler":n(a,"eslint-plugin-react-compiler"),..._.configs.recommended.plugins,"ssr-friendly":w,"react-refresh":i},settings:{"react-x":{version:"detect",additionalHooks:d,additionalComponents:f}},languageOptions:{globals:r.browser},rules:{...o.configs.recommended.rules,"react-compiler/react-compiler":t,"react-hooks/exhaustive-deps":["error",{additionalHooks:l}],"@stylistic/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],..._.configs.recommended.rules,"@eslint-react/no-string-refs":"error","@eslint-react/no-comment-textnodes":"error","@eslint-react/dom/no-unsafe-target-blank":"error","@eslint-react/no-children-prop":"error","@eslint-react/dom/no-dangerously-set-innerhtml-with-children":"error","@eslint-react/dom/no-render-return-value":"error","@eslint-react/no-direct-mutation-state":"error","@eslint-react/dom/no-find-dom-node":"error","@eslint-react/no-unsafe-component-will-mount":"warn","@eslint-react/no-unsafe-component-will-receive-props":"warn","@eslint-react/no-unsafe-component-will-update":"warn","@eslint-react/prefer-destructuring-assignment":"warn","@eslint-react/no-unused-state":"error","@eslint-react/no-access-state-in-setstate":"error","@eslint-react/dom/no-script-url":"error","@eslint-react/no-unused-class-component-members":"error","@eslint-react/naming-convention/component-name":["error",{rule:"PascalCase"}],"@eslint-react/naming-convention/filename":["error",{rule:"kebab-case"}],"@eslint-react/naming-convention/filename-extension":["error",{allow:"as-needed"}],"@eslint-react/naming-convention/use-state":"error","react-prefer-function-component/react-prefer-function-component":"error","@stylistic/jsx-self-closing-comp":"error","@eslint-react/prefer-shorthand-boolean":"error","@stylistic/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"@stylistic/jsx-indent-props":["error",2],"@stylistic/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"@stylistic/jsx-wrap-multilines":["error",{declaration:"parens-new-line",assignment:"parens-new-line",return:"parens-new-line",arrow:"parens-new-line",condition:"ignore",logical:"ignore",prop:"ignore"}],"@stylistic/jsx-first-prop-new-line":["error","multiline-multiprop"],"@stylistic/jsx-function-call-newline":["error","multiline"],"@stylistic/jsx-equals-spacing":["error","never"],"@stylistic/jsx-indent":"off","@stylistic/jsx-child-element-spacing":"error","@stylistic/jsx-closing-bracket-location":["error","line-aligned"],"@stylistic/jsx-tag-spacing":["error",{closingSlash:"never",beforeSelfClosing:"always",afterOpening:"never",beforeClosing:"never"}],"@eslint-react/dom/no-children-in-void-dom-elements":"error","@stylistic/jsx-curly-brace-presence":["error",{props:"never",children:"never"}],"@eslint-react/prefer-shorthand-fragment":"error","@stylistic/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"@eslint-react/no-missing-key":"error","@eslint-react/no-array-index-key":"error","@eslint-react/no-duplicate-key":"error","@eslint-react/no-implicit-key":"error","@eslint-react/jsx-uses-react":"off","@eslint-react/no-useless-fragment":"error","@eslint-react/no-unstable-context-value":"error","@eslint-react/no-nested-components":"error","@eslint-react/dom/no-missing-iframe-sandbox":"warn","@eslint-react/dom/no-unsafe-iframe-sandbox":"warn","@eslint-react/no-leaked-conditional-rendering":"error","@eslint-react/no-unstable-default-props":"error","@eslint-react/dom/no-missing-button-type":"error","@eslint-react/dom/no-namespace":"error","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"],ignoreClassesThatImplementAnInterface:"public-fields"}],"jsx-a11y-minimal/alt-text":["warn",{elements:["img"],img:["Image"]}],"jsx-a11y-minimal/aria-props":"warn","jsx-a11y-minimal/aria-proptypes":"warn","jsx-a11y-minimal/aria-role":"warn","jsx-a11y-minimal/aria-unsupported-elements":"warn","jsx-a11y-minimal/iframe-has-title":"warn","jsx-a11y-minimal/no-access-key":"warn","jsx-a11y-minimal/role-has-required-aria-props":"warn","jsx-a11y-minimal/role-supports-aria-props":"warn","jsx-a11y-minimal/tabindex-no-positive":"warn","react-refresh/only-export-components":["warn",{allowConstantExport:g,allowExportNames:[...p?["config","generateStaticParams","metadata","generateMetadata","viewport","generateViewport"]:[],...m?["meta","links","headers","loader","action"]:[]]}]}},{name:"sukka/react next.js/nextra naming convention",files:["**/app/**/_*.cjs",String.raw`**/app/**/\[*.?([cm])[j]s?(x)`,"**/pages/_(app|document).?([cm])[jt]s?(x)"],rules:{"@eslint-react/naming-convention/filename":"off"}}]}async function O({opt:n={}}={}){return[{plugins:{"@stylexjs":(await import("@stylexjs/eslint-plugin")).default},files:[e.GLOB_TS,e.GLOB_TSX,e.GLOB_JSX],rules:{"@stylexjs/valid-styles":["error",n],"@stylexjs/valid-shorthands":["error",n],"@stylexjs/sort-keys":"off"}}]}export{u as next,j as react,O as stylex};
|