@tarsilla/eslint-config 0.0.35 → 0.0.37
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/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +10 -9
- package/src/library.ts +17 -12
- package/src/react.ts +29 -18
package/lib/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@eslint/js"),r=require("eslint-plugin-import"),
|
|
1
|
+
"use strict";var e=require("@eslint/js"),r=require("eslint-plugin-import"),s=require("eslint-plugin-jest"),t=require("eslint-plugin-prettier/recommended"),i=require("eslint-plugin-unused-imports"),n=require("globals"),o=require("typescript-eslint"),a=require("eslint-plugin-react"),l=require("eslint-plugin-react-hooks");const p=n;const u=n;exports.library=function({ignores:n}){return o.config(e.configs.recommended,r.flatConfigs.recommended,r.flatConfigs.typescript,...o.configs.recommended,{files:["**/*.{ts,tsx}"],extends:[...o.configs.recommendedTypeChecked],languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module",project:!0,tsconfigRootDir:"./"}},rules:{"@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-unused-vars":"off"}},{files:["**/*.test.{js,ts,jsx,tsx}"],...s.configs["flat/recommended"],languageOptions:{globals:{...p.jest}}},t,{ignores:n},{plugins:{"unused-imports":i},rules:{"prettier/prettier":["error",{semi:!0,trailingComma:"all",singleQuote:!0,printWidth:120,tabWidth:2},{usePrettierrc:!1,fileInfoOptions:{withNodeModules:!0}}],"no-unused-vars":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}],"sort-imports":["error",{ignoreCase:!0,ignoreDeclarationSort:!0,ignoreMemberSort:!1}],"import/order":["error",{groups:["builtin","external","internal",["parent","sibling"]],"newlines-between":"always",alphabetize:{order:"asc",caseInsensitive:!0}}]},settings:{"import/resolver":{typescript:!0,node:!0}}})},exports.react=function({ignores:n}){return o.config(e.configs.recommended,r.flatConfigs.recommended,r.flatConfigs.typescript,...o.configs.recommended,{files:["**/*.{ts,tsx}"],extends:[...o.configs.recommendedTypeChecked],languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module",project:!0,tsconfigRootDir:"./"}},rules:{"@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-unused-vars":"off"}},{files:["**/*.{jsx,tsx}"],...a.configs.flat.recommended,...a.configs.flat["jsx-runtime"],languageOptions:{...a.configs.flat.recommended.languageOptions,globals:{...u.serviceworker,...Object.keys(u.browser).reduce(((e,r)=>(e[r.trim()]=u.browser[r],e)),{})}},plugins:{"react-hooks":l},rules:{...l.configs.recommended.rules,"react/react-in-jsx-scope":"off","react/jsx-uses-react":"off"}},{files:["**/*.test.{js,ts,jsx,tsx}"],...s.configs["flat/recommended"],languageOptions:{globals:{...u.jest}}},t,{ignores:n},{plugins:{"unused-imports":i},rules:{"prettier/prettier":["error",{semi:!0,trailingComma:"all",singleQuote:!0,jsxSingleQuote:!0,printWidth:120,tabWidth:2},{usePrettierrc:!1,fileInfoOptions:{withNodeModules:!0}}],"no-unused-vars":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}],"sort-imports":["error",{ignoreCase:!0,ignoreDeclarationSort:!0,ignoreMemberSort:!1}],"import/order":["error",{groups:["builtin","external","internal",["parent","sibling"]],pathGroups:[{pattern:"react",group:"external",position:"before"}],pathGroupsExcludedImportTypes:["react"],"newlines-between":"always",alphabetize:{order:"asc",caseInsensitive:!0}}]},settings:{"import/resolver":{typescript:!0,node:!0},react:{version:"detect"}}})};
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/lib/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/library.ts","../src/react.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n ...configs.recommendedTypeChecked,\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n 'no-unused-vars': 'off',\n '@typescript-eslint/no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n },\n );\n}\n\nexport { library };\n","import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\n//import reactRecommended from 'eslint-plugin-react/configs/recommended.js';\nimport reactPlugin from 'eslint-plugin-react';\nimport reactHooks from 'eslint-plugin-react-hooks';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n ...configs.recommendedTypeChecked,\n {\n files: ['**/*.{jsx,tsx}'],\n ...reactPlugin.configs.flat.recommended,\n ...reactPlugin.configs.flat['jsx-runtime'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n },\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n plugins: {\n 'unused-imports': unusedImports,\n 'react-hooks': reactHooks,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n jsxSingleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n ...reactHooks.configs.recommended.rules,\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-uses-react': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n 'no-unused-vars': 'off',\n '@typescript-eslint/no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n pathGroups: [\n {\n pattern: 'react',\n group: 'external',\n position: 'before',\n },\n ],\n pathGroupsExcludedImportTypes: ['react'],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n react: {\n version: 'detect',\n },\n },\n },\n );\n}\n\nexport { react };\n"],"names":["globals","globalsImp","ignores","config","js","configs","recommended","imports","flatConfigs","typescript","recommendedTypeChecked","files","jest","languageOptions","prettierRecommended","parserOptions","ecmaVersion","sourceType","project","tsconfigRootDir","plugins","unusedImports","rules","semi","trailingComma","singleQuote","printWidth","tabWidth","usePrettierrc","fileInfoOptions","withNodeModules","vars","varsIgnorePattern","args","argsIgnorePattern","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","groups","alphabetize","order","caseInsensitive","settings","node","reactPlugin","flat","serviceworker","browser","reactHooks","jsxSingleQuote","pathGroups","pattern","group","position","pathGroupsExcludedImportTypes","react","version"],"mappings":"iUAWA,MAAMA,EAAUC,ECGhB,MAAMD,EAAUC,kBDDhB,UAAiBC,QAAEA,IACjB,OAAO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+C,WAIjB,CACEpC,MAAO,CAAC,gCACLC,EAAKP,QAAQ,oBAChBQ,gBAAiB,CACfb,QAAS,IACJA,EAAQY,QAKjBE,EACA,CACEZ,WAEF,CACEW,gBAAiB,CACfE,cAAe,CACbC,YAAa,SACbC,WAAY,SACZC,SAAS,EACTC,gBAAiB,OAGrBC,QAAS,CACP,iBAAkBC,EAClB,cAAe2B,GAEjB1B,MAAO,CACL,oBAAqB,CACnB,QACA,CACEC,MAAM,EACNC,cAAe,MACfC,aAAa,EACbwB,gBAAgB,EAChBvB,WAAY,IACZC,SAAU,GAEZ,CACEC,eAAe,EACfC,gBAAiB,CACfC,iBAAiB,QAIpBkB,EAAW3C,QAAQC,YAAYgB,MAClC,2BAA4B,MAC5B,uBAAwB,MACxB,oDAAqD,QACrD,qCAAsC,QACtC,iBAAkB,MAClB,oCAAqC,MACrC,mCAAoC,QACpC,gCAAiC,CAC/B,QACA,CACES,KAAM,MACNC,kBAAmB,KACnBC,KAAM,aACNC,kBAAmB,OAGvB,eAAgB,CACd,QACA,CACEC,YAAY,EACZC,uBAAuB,EACvBC,kBAAkB,IAGtB,eAAgB,CACd,QACA,CACEC,OAAQ,CAAC,UAAW,WAAY,WAAY,CAAC,SAAU,YACvDY,WAAY,CACV,CACEC,QAAS,QACTC,MAAO,WACPC,SAAU,WAGdC,8BAA+B,CAAC,SAChC,mBAAoB,SACpBf,YAAa,CACXC,MAAO,MACPC,iBAAiB,MAKzBC,SAAU,CACR,kBAAmB,CACjBjC,YAAY,EACZkC,MAAM,GAERY,MAAO,CACLC,QAAS,YAKnB"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/library.ts","../src/react.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n {\n files: ['**/*.{ts,tsx}'],\n extends: [...configs.recommendedTypeChecked],\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n 'no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n },\n );\n}\n\nexport { library };\n","import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport reactPlugin from 'eslint-plugin-react';\nimport reactHooks from 'eslint-plugin-react-hooks';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n {\n files: ['**/*.{ts,tsx}'],\n extends: [...configs.recommendedTypeChecked],\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{jsx,tsx}'],\n ...reactPlugin.configs.flat.recommended,\n ...reactPlugin.configs.flat['jsx-runtime'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...Object.keys(globals.browser).reduce<Record<string, boolean>>((acc, key) => {\n acc[key.trim()] = globals.browser[key];\n return acc;\n }, {}),\n },\n },\n plugins: {\n 'react-hooks': reactHooks,\n },\n rules: {\n ...reactHooks.configs.recommended.rules,\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-uses-react': 'off',\n },\n },\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n jsxSingleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n 'no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n pathGroups: [\n {\n pattern: 'react',\n group: 'external',\n position: 'before',\n },\n ],\n pathGroupsExcludedImportTypes: ['react'],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n react: {\n version: 'detect',\n },\n },\n },\n );\n}\n\nexport { react };\n"],"names":["globals","globalsImp","ignores","config","js","configs","recommended","imports","flatConfigs","typescript","files","extends","recommendedTypeChecked","languageOptions","parserOptions","ecmaVersion","sourceType","project","tsconfigRootDir","rules","jest","prettierRecommended","plugins","unusedImports","semi","trailingComma","singleQuote","printWidth","tabWidth","usePrettierrc","fileInfoOptions","withNodeModules","vars","varsIgnorePattern","args","argsIgnorePattern","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","groups","alphabetize","order","caseInsensitive","settings","node","reactPlugin","flat","serviceworker","Object","keys","browser","reduce","acc","key","trim","reactHooks","jsxSingleQuote","pathGroups","pattern","group","position","pathGroupsExcludedImportTypes","react","version"],"mappings":"iUAWA,MAAMA,EAAUC,ECEhB,MAAMD,EAAUC,kBDAhB,UAAiBC,QAAEA,IACjB,OAAOC,EAAMA,OACXC,EAAGC,QAAQC,YACXC,EAAQC,YAAYF,YACpBC,EAAQC,YAAYC,cACjBJ,EAAAA,QAAQC,Y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zBuC,EAAYxC,QAAQyC,KAAK,eAC5BjC,gBAAiB,IACZgC,EAAYxC,QAAQyC,KAAKxC,YAAYO,gBACxCb,QAAS,IACJA,EAAQ+C,iBACRC,OAAOC,KAAKjD,EAAQkD,SAASC,QAAgC,CAACC,EAAKC,KACpED,EAAIC,EAAIC,QAAUtD,EAAQkD,QAAQG,GAC3BD,IACN,MAGP9B,QAAS,CACP,cAAeiC,GAEjBpC,MAAO,IACFoC,EAAWlD,QAAQC,YAAYa,MAClC,2BAA4B,MAC5B,uBAAwB,QAG5B,CACET,MAAO,CAAC,gCACLU,EAAKf,QAAQ,oBAChBQ,gBAAiB,CACfb,QAAS,IACJA,EAAQoB,QAKjBC,EACA,CACEnB,WAEF,CACEoB,QAAS,CACP,iBAAkBC,GAEpBJ,MAAO,CACL,oBAAqB,CACnB,QACA,CACEK,MAAM,EACNC,cAAe,MACfC,aAAa,EACb8B,gBAAgB,EAChB7B,WAAY,IACZC,SAAU,GAEZ,CACEC,eAAe,EACfC,gBAAiB,CACfC,iBAAiB,KAIvB,iBAAkB,MAClB,mCAAoC,QACpC,gCAAiC,CAC/B,QACA,CACEC,KAAM,MACNC,kBAAmB,KACnBC,KAAM,aACNC,kBAAmB,OAGvB,eAAgB,CACd,QACA,CACEC,YAAY,EACZC,uBAAuB,EACvBC,kBAAkB,IAGtB,eAAgB,CACd,QACA,CACEC,OAAQ,CAAC,UAAW,WAAY,WAAY,CAAC,SAAU,YACvDkB,WAAY,CACV,CACEC,QAAS,QACTC,MAAO,WACPC,SAAU,WAGdC,8BAA+B,CAAC,SAChC,mBAAoB,SACpBrB,YAAa,CACXC,MAAO,MACPC,iBAAiB,MAKzBC,SAAU,CACR,kBAAmB,CACjBlC,YAAY,EACZmC,MAAM,GAERkB,MAAO,CACLC,QAAS,YAKnB"}
|
package/lib/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@eslint/js";import r from"eslint-plugin-import";import t from"eslint-plugin-jest";import
|
|
1
|
+
import e from"@eslint/js";import r from"eslint-plugin-import";import t from"eslint-plugin-jest";import s from"eslint-plugin-prettier/recommended";import o from"eslint-plugin-unused-imports";import n from"globals";import{config as i,configs as l}from"typescript-eslint";import p from"eslint-plugin-react";import a from"eslint-plugin-react-hooks";const u=n;function m({ignores:n}){return i(e.configs.recommended,r.flatConfigs.recommended,r.flatConfigs.typescript,...l.recommended,{files:["**/*.{ts,tsx}"],extends:[...l.recommendedTypeChecked],languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module",project:!0,tsconfigRootDir:"./"}},rules:{"@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-unused-vars":"off"}},{files:["**/*.test.{js,ts,jsx,tsx}"],...t.configs["flat/recommended"],languageOptions:{globals:{...u.jest}}},s,{ignores:n},{plugins:{"unused-imports":o},rules:{"prettier/prettier":["error",{semi:!0,trailingComma:"all",singleQuote:!0,printWidth:120,tabWidth:2},{usePrettierrc:!1,fileInfoOptions:{withNodeModules:!0}}],"no-unused-vars":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}],"sort-imports":["error",{ignoreCase:!0,ignoreDeclarationSort:!0,ignoreMemberSort:!1}],"import/order":["error",{groups:["builtin","external","internal",["parent","sibling"]],"newlines-between":"always",alphabetize:{order:"asc",caseInsensitive:!0}}]},settings:{"import/resolver":{typescript:!0,node:!0}}})}const c=n;function d({ignores:n}){return i(e.configs.recommended,r.flatConfigs.recommended,r.flatConfigs.typescript,...l.recommended,{files:["**/*.{ts,tsx}"],extends:[...l.recommendedTypeChecked],languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module",project:!0,tsconfigRootDir:"./"}},rules:{"@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-unused-vars":"off"}},{files:["**/*.{jsx,tsx}"],...p.configs.flat.recommended,...p.configs.flat["jsx-runtime"],languageOptions:{...p.configs.flat.recommended.languageOptions,globals:{...c.serviceworker,...Object.keys(c.browser).reduce(((e,r)=>(e[r.trim()]=c.browser[r],e)),{})}},plugins:{"react-hooks":a},rules:{...a.configs.recommended.rules,"react/react-in-jsx-scope":"off","react/jsx-uses-react":"off"}},{files:["**/*.test.{js,ts,jsx,tsx}"],...t.configs["flat/recommended"],languageOptions:{globals:{...c.jest}}},s,{ignores:n},{plugins:{"unused-imports":o},rules:{"prettier/prettier":["error",{semi:!0,trailingComma:"all",singleQuote:!0,jsxSingleQuote:!0,printWidth:120,tabWidth:2},{usePrettierrc:!1,fileInfoOptions:{withNodeModules:!0}}],"no-unused-vars":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}],"sort-imports":["error",{ignoreCase:!0,ignoreDeclarationSort:!0,ignoreMemberSort:!1}],"import/order":["error",{groups:["builtin","external","internal",["parent","sibling"]],pathGroups:[{pattern:"react",group:"external",position:"before"}],pathGroupsExcludedImportTypes:["react"],"newlines-between":"always",alphabetize:{order:"asc",caseInsensitive:!0}}]},settings:{"import/resolver":{typescript:!0,node:!0},react:{version:"detect"}}})}export{m as library,d as react};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/library.ts","../src/react.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n ...configs.recommendedTypeChecked,\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n 'no-unused-vars': 'off',\n '@typescript-eslint/no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n },\n );\n}\n\nexport { library };\n","import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\n//import reactRecommended from 'eslint-plugin-react/configs/recommended.js';\nimport reactPlugin from 'eslint-plugin-react';\nimport reactHooks from 'eslint-plugin-react-hooks';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n ...configs.recommendedTypeChecked,\n {\n files: ['**/*.{jsx,tsx}'],\n ...reactPlugin.configs.flat.recommended,\n ...reactPlugin.configs.flat['jsx-runtime'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n },\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n plugins: {\n 'unused-imports': unusedImports,\n 'react-hooks': reactHooks,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n jsxSingleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n ...reactHooks.configs.recommended.rules,\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-uses-react': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n 'no-unused-vars': 'off',\n '@typescript-eslint/no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n pathGroups: [\n {\n pattern: 'react',\n group: 'external',\n position: 'before',\n },\n ],\n pathGroupsExcludedImportTypes: ['react'],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n react: {\n version: 'detect',\n },\n },\n },\n );\n}\n\nexport { react };\n"],"names":["globals","globalsImp","library","ignores","config","js","configs","recommended","imports","flatConfigs","typescript","recommendedTypeChecked","files","jest","languageOptions","prettierRecommended","parserOptions","ecmaVersion","sourceType","project","tsconfigRootDir","plugins","unusedImports","rules","semi","trailingComma","singleQuote","printWidth","tabWidth","usePrettierrc","fileInfoOptions","withNodeModules","vars","varsIgnorePattern","args","argsIgnorePattern","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","groups","alphabetize","order","caseInsensitive","settings","node","react","reactPlugin","flat","serviceworker","browser","reactHooks","jsxSingleQuote","pathGroups","pattern","group","position","pathGroupsExcludedImportTypes","version"],"mappings":"yVAWA,MAAMA,EAAUC,EAEhB,SAASC,GAAQC,QAAEA,IACjB,OAAOC,EACLC,EAAGC,QAAQC,YACXC,EAAQC,YAAYF,YACpBC,EAAQC,YAAYC,cACjBJ,EAAQC,eACRD,EAAQK,uBACX,CACEC,MAAO,CAAC,gCACLC,EAAKP,QAAQ,oBAChBQ,gBAAiB,CACfd,QAAS,IACJA,EAAQa,QAKjBE,EACA,CACEZ,WAEF,CACEW,gBAAiB,CACfE,cAAe,CACbC,YAAa,SACbC,WAAY,SACZC,SAAS,EACTC,gBAAiB,OAGrBC,QAAS,CACP,iBAAkBC,GAEpBC,MAAO,CACL,oBAAqB,CACnB,QACA,CACEC,MAAM,EACNC,cAAe,MACfC,aAAa,EAC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,QAIpBmB,EAAW5C,QAAQC,YAAYgB,MAClC,2BAA4B,MAC5B,uBAAwB,MACxB,oDAAqD,QACrD,qCAAsC,QACtC,iBAAkB,MAClB,oCAAqC,MACrC,mCAAoC,QACpC,gCAAiC,CAC/B,QACA,CACES,KAAM,MACNC,kBAAmB,KACnBC,KAAM,aACNC,kBAAmB,OAGvB,eAAgB,CACd,QACA,CACEC,YAAY,EACZC,uBAAuB,EACvBC,kBAAkB,IAGtB,eAAgB,CACd,QACA,CACEC,OAAQ,CAAC,UAAW,WAAY,WAAY,CAAC,SAAU,YACvDa,WAAY,CACV,CACEC,QAAS,QACTC,MAAO,WACPC,SAAU,WAGdC,8BAA+B,CAAC,SAChC,mBAAoB,SACpBhB,YAAa,CACXC,MAAO,MACPC,iBAAiB,MAKzBC,SAAU,CACR,kBAAmB,CACjBjC,YAAY,EACZkC,MAAM,GAERC,MAAO,CACLY,QAAS,YAKnB"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/library.ts","../src/react.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n {\n files: ['**/*.{ts,tsx}'],\n extends: [...configs.recommendedTypeChecked],\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n 'no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n },\n );\n}\n\nexport { library };\n","import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport jest from 'eslint-plugin-jest';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport reactPlugin from 'eslint-plugin-react';\nimport reactHooks from 'eslint-plugin-react-hooks';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport globalsImp from 'globals';\nimport { config, configs } from 'typescript-eslint';\n\nimport { Config } from './Config';\n\nconst globals = globalsImp as Record<string, Record<string, boolean>>;\n\nfunction react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {\n return config(\n js.configs.recommended,\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n ...configs.recommended,\n {\n files: ['**/*.{ts,tsx}'],\n extends: [...configs.recommendedTypeChecked],\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n rules: {\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n '@typescript-eslint/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{jsx,tsx}'],\n ...reactPlugin.configs.flat.recommended,\n ...reactPlugin.configs.flat['jsx-runtime'],\n languageOptions: {\n ...reactPlugin.configs.flat.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...Object.keys(globals.browser).reduce<Record<string, boolean>>((acc, key) => {\n acc[key.trim()] = globals.browser[key];\n return acc;\n }, {}),\n },\n },\n plugins: {\n 'react-hooks': reactHooks,\n },\n rules: {\n ...reactHooks.configs.recommended.rules,\n 'react/react-in-jsx-scope': 'off',\n 'react/jsx-uses-react': 'off',\n },\n },\n {\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n languageOptions: {\n globals: {\n ...globals.jest,\n //...globals.vitest,\n },\n },\n },\n prettierRecommended,\n {\n ignores,\n },\n {\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n semi: true,\n trailingComma: 'all',\n singleQuote: true,\n jsxSingleQuote: true,\n printWidth: 120,\n tabWidth: 2,\n },\n {\n usePrettierrc: false,\n fileInfoOptions: {\n withNodeModules: true,\n },\n },\n ],\n 'no-unused-vars': 'off',\n 'unused-imports/no-unused-imports': 'error',\n 'unused-imports/no-unused-vars': [\n 'error',\n {\n vars: 'all',\n varsIgnorePattern: '^_',\n args: 'after-used',\n argsIgnorePattern: '^_',\n },\n ],\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n 'import/order': [\n 'error',\n {\n groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],\n pathGroups: [\n {\n pattern: 'react',\n group: 'external',\n position: 'before',\n },\n ],\n pathGroupsExcludedImportTypes: ['react'],\n 'newlines-between': 'always',\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n react: {\n version: 'detect',\n },\n },\n },\n );\n}\n\nexport { react };\n"],"names":["globals","globalsImp","library","ignores","config","js","configs","recommended","imports","flatConfigs","typescript","files","extends","recommendedTypeChecked","languageOptions","parserOptions","ecmaVersion","sourceType","project","tsconfigRootDir","rules","jest","prettierRecommended","plugins","unusedImports","semi","trailingComma","singleQuote","printWidth","tabWidth","usePrettierrc","fileInfoOptions","withNodeModules","vars","varsIgnorePattern","args","argsIgnorePattern","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","groups","alphabetize","order","caseInsensitive","settings","node","react","reactPlugin","flat","serviceworker","Object","keys","browser","reduce","acc","key","trim","reactHooks","jsxSingleQuote","pathGroups","pattern","group","position","pathGroupsExcludedImportTypes","version"],"mappings":"yVAWA,MAAMA,EAAUC,EAEhB,SAASC,GAAQC,QAAEA,IACjB,OAAOC,EACLC,EAAGC,QAAQC,YACXC,EAAQC,YAAYF,YACpBC,EAAQC,YAAYC,cACjBJ,EAAQC,YACX,CACEI,MAAO,CAAC,iBACRC,QAAS,IAAIN,EAAQO,wBACrBC,gBAAiB,CACfC,cAAe,CACbC,YAAa,SACbC,WAAY,SACZC,SAAS,EACTC,gBAAiB,OAGrBC,MAAO,CACL,oDAAqD,QACrD,qCAAsC,QACtC,oCAAqC,QAGzC,CACET,MAAO,CAAC,gCACLU,EAAKf,QAAQ,oBAChBQ,gBAAiB,CACfd,QAAS,IACJA,EAAQqB,QAKjBC,EACA,CACEnB,WAEF,CACEoB,QAAS,CACP,iBAAkBC,GAEpBJ,MAAO,CACL,oBAAqB,CACnB,QACA,CACEK,MAAM,EACNC,cAAe,MACfC,aAAa,EACbC,WAAY,IACZC,SAAU,GAEZ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BC,EACA,CACEnB,WAEF,CACEoB,QAAS,CACP,iBAAkBC,GAEpBJ,MAAO,CACL,oBAAqB,CACnB,QACA,CACEK,MAAM,EACNC,cAAe,MACfC,aAAa,EACb+B,gBAAgB,EAChB9B,WAAY,IACZC,SAAU,GAEZ,CACEC,eAAe,EACfC,gBAAiB,CACfC,iBAAiB,KAIvB,iBAAkB,MAClB,mCAAoC,QACpC,gCAAiC,CAC/B,QACA,CACEC,KAAM,MACNC,kBAAmB,KACnBC,KAAM,aACNC,kBAAmB,OAGvB,eAAgB,CACd,QACA,CACEC,YAAY,EACZC,uBAAuB,EACvBC,kBAAkB,IAGtB,eAAgB,CACd,QACA,CACEC,OAAQ,CAAC,UAAW,WAAY,WAAY,CAAC,SAAU,YACvDmB,WAAY,CACV,CACEC,QAAS,QACTC,MAAO,WACPC,SAAU,WAGdC,8BAA+B,CAAC,SAChC,mBAAoB,SACpBtB,YAAa,CACXC,MAAO,MACPC,iBAAiB,MAKzBC,SAAU,CACR,kBAAmB,CACjBlC,YAAY,EACZmC,MAAM,GAERC,MAAO,CACLkB,QAAS,YAKnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarsilla/eslint-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22"
|
|
6
6
|
},
|
|
@@ -31,28 +31,29 @@
|
|
|
31
31
|
"pub": "npm publish --access public"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"eslint": "
|
|
34
|
+
"eslint": ">=9"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@eslint/js": "^9.
|
|
38
|
-
"@types/node": "^22.13.
|
|
37
|
+
"@eslint/js": "^9.20.0",
|
|
38
|
+
"@types/node": "^22.13.4",
|
|
39
|
+
"eslint": "^9.20.1",
|
|
39
40
|
"eslint-config-prettier": "^10.0.1",
|
|
40
|
-
"eslint-import-resolver-typescript": "^3.
|
|
41
|
-
"eslint-plugin-jest": "^28.11.0",
|
|
41
|
+
"eslint-import-resolver-typescript": "^3.8.2",
|
|
42
42
|
"eslint-plugin-import": "^2.31.0",
|
|
43
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
43
44
|
"eslint-plugin-prettier": "^5.2.3",
|
|
44
45
|
"eslint-plugin-react": "^7.37.4",
|
|
45
46
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
46
47
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
47
|
-
"prettier": "^3.
|
|
48
|
-
"typescript-eslint": "^8.
|
|
48
|
+
"prettier": "^3.5.1",
|
|
49
|
+
"typescript-eslint": "^8.24.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@rollup/plugin-terser": "^0.4.4",
|
|
52
53
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
53
54
|
"@types/eslint__js": "^8.42.3",
|
|
54
55
|
"jiti": "^2.4.2",
|
|
55
|
-
"rollup": "^4.34.
|
|
56
|
+
"rollup": "^4.34.8",
|
|
56
57
|
"rollup-plugin-dts": "^6.1.1",
|
|
57
58
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
58
59
|
"typescript": "^5.7.3"
|
package/src/library.ts
CHANGED
|
@@ -17,7 +17,23 @@ function library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
17
17
|
imports.flatConfigs.recommended,
|
|
18
18
|
imports.flatConfigs.typescript,
|
|
19
19
|
...configs.recommended,
|
|
20
|
-
|
|
20
|
+
{
|
|
21
|
+
files: ['**/*.{ts,tsx}'],
|
|
22
|
+
extends: [...configs.recommendedTypeChecked],
|
|
23
|
+
languageOptions: {
|
|
24
|
+
parserOptions: {
|
|
25
|
+
ecmaVersion: 'latest',
|
|
26
|
+
sourceType: 'module',
|
|
27
|
+
project: true,
|
|
28
|
+
tsconfigRootDir: './',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
rules: {
|
|
32
|
+
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
33
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
34
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
21
37
|
{
|
|
22
38
|
files: ['**/*.test.{js,ts,jsx,tsx}'],
|
|
23
39
|
...jest.configs['flat/recommended'],
|
|
@@ -33,14 +49,6 @@ function library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
33
49
|
ignores,
|
|
34
50
|
},
|
|
35
51
|
{
|
|
36
|
-
languageOptions: {
|
|
37
|
-
parserOptions: {
|
|
38
|
-
ecmaVersion: 'latest',
|
|
39
|
-
sourceType: 'module',
|
|
40
|
-
project: true,
|
|
41
|
-
tsconfigRootDir: './',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
52
|
plugins: {
|
|
45
53
|
'unused-imports': unusedImports,
|
|
46
54
|
},
|
|
@@ -61,10 +69,7 @@ function library({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
61
69
|
},
|
|
62
70
|
},
|
|
63
71
|
],
|
|
64
|
-
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
65
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
|
66
72
|
'no-unused-vars': 'off',
|
|
67
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
68
73
|
'unused-imports/no-unused-imports': 'error',
|
|
69
74
|
'unused-imports/no-unused-vars': [
|
|
70
75
|
'error',
|
package/src/react.ts
CHANGED
|
@@ -3,7 +3,6 @@ import type { TSESLint } from '@typescript-eslint/utils';
|
|
|
3
3
|
import imports from 'eslint-plugin-import';
|
|
4
4
|
import jest from 'eslint-plugin-jest';
|
|
5
5
|
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
6
|
-
//import reactRecommended from 'eslint-plugin-react/configs/recommended.js';
|
|
7
6
|
import reactPlugin from 'eslint-plugin-react';
|
|
8
7
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
9
8
|
import unusedImports from 'eslint-plugin-unused-imports';
|
|
@@ -20,7 +19,23 @@ function react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
20
19
|
imports.flatConfigs.recommended,
|
|
21
20
|
imports.flatConfigs.typescript,
|
|
22
21
|
...configs.recommended,
|
|
23
|
-
|
|
22
|
+
{
|
|
23
|
+
files: ['**/*.{ts,tsx}'],
|
|
24
|
+
extends: [...configs.recommendedTypeChecked],
|
|
25
|
+
languageOptions: {
|
|
26
|
+
parserOptions: {
|
|
27
|
+
ecmaVersion: 'latest',
|
|
28
|
+
sourceType: 'module',
|
|
29
|
+
project: true,
|
|
30
|
+
tsconfigRootDir: './',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
rules: {
|
|
34
|
+
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
35
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
36
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
24
39
|
{
|
|
25
40
|
files: ['**/*.{jsx,tsx}'],
|
|
26
41
|
...reactPlugin.configs.flat.recommended,
|
|
@@ -29,9 +44,20 @@ function react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
29
44
|
...reactPlugin.configs.flat.recommended.languageOptions,
|
|
30
45
|
globals: {
|
|
31
46
|
...globals.serviceworker,
|
|
32
|
-
...globals.browser,
|
|
47
|
+
...Object.keys(globals.browser).reduce<Record<string, boolean>>((acc, key) => {
|
|
48
|
+
acc[key.trim()] = globals.browser[key];
|
|
49
|
+
return acc;
|
|
50
|
+
}, {}),
|
|
33
51
|
},
|
|
34
52
|
},
|
|
53
|
+
plugins: {
|
|
54
|
+
'react-hooks': reactHooks,
|
|
55
|
+
},
|
|
56
|
+
rules: {
|
|
57
|
+
...reactHooks.configs.recommended.rules,
|
|
58
|
+
'react/react-in-jsx-scope': 'off',
|
|
59
|
+
'react/jsx-uses-react': 'off',
|
|
60
|
+
},
|
|
35
61
|
},
|
|
36
62
|
{
|
|
37
63
|
files: ['**/*.test.{js,ts,jsx,tsx}'],
|
|
@@ -48,17 +74,8 @@ function react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
48
74
|
ignores,
|
|
49
75
|
},
|
|
50
76
|
{
|
|
51
|
-
languageOptions: {
|
|
52
|
-
parserOptions: {
|
|
53
|
-
ecmaVersion: 'latest',
|
|
54
|
-
sourceType: 'module',
|
|
55
|
-
project: true,
|
|
56
|
-
tsconfigRootDir: './',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
77
|
plugins: {
|
|
60
78
|
'unused-imports': unusedImports,
|
|
61
|
-
'react-hooks': reactHooks,
|
|
62
79
|
},
|
|
63
80
|
rules: {
|
|
64
81
|
'prettier/prettier': [
|
|
@@ -78,13 +95,7 @@ function react({ ignores }: Config): TSESLint.FlatConfig.ConfigArray {
|
|
|
78
95
|
},
|
|
79
96
|
},
|
|
80
97
|
],
|
|
81
|
-
...reactHooks.configs.recommended.rules,
|
|
82
|
-
'react/react-in-jsx-scope': 'off',
|
|
83
|
-
'react/jsx-uses-react': 'off',
|
|
84
|
-
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
85
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
|
86
98
|
'no-unused-vars': 'off',
|
|
87
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
88
99
|
'unused-imports/no-unused-imports': 'error',
|
|
89
100
|
'unused-imports/no-unused-vars': [
|
|
90
101
|
'error',
|