@tarsilla/eslint-config 0.2.0 → 0.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/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/lib/library/index.cjs +1 -1
- package/lib/library/index.cjs.map +1 -1
- package/lib/library/index.mjs +1 -1
- package/lib/library/index.mjs.map +1 -1
- package/lib/next/index.cjs +1 -1
- package/lib/next/index.cjs.map +1 -1
- package/lib/next/index.mjs +1 -1
- package/lib/next/index.mjs.map +1 -1
- package/lib/react/index.cjs +1 -1
- package/lib/react/index.cjs.map +1 -1
- package/lib/react/index.mjs +1 -1
- package/lib/react/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/commons/all.ts +18 -0
- package/src/commons/imports.ts +44 -0
- package/src/commons/index.ts +9 -0
- package/src/commons/javascript.ts +9 -0
- package/src/commons/jest.ts +10 -0
- package/src/commons/prettier.ts +31 -0
- package/src/commons/react-hooks.ts +17 -0
- package/src/commons/sortImports.ts +17 -0
- package/src/commons/typescript.ts +16 -0
- package/src/commons/unusedImports.ts +25 -0
- package/src/library/eslintLibraryConfig.ts +19 -117
- package/src/next/eslintNextConfig.ts +23 -115
- package/src/react/eslintReactConfig.ts +24 -139
package/lib/react/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("
|
|
1
|
+
"use strict";var e=require("eslint-plugin-react"),r=require("typescript-eslint"),s=require("@eslint/js"),t=require("eslint-plugin-import"),i=require("eslint-plugin-jest"),n=require("eslint-plugin-prettier/recommended"),o=require("eslint-plugin-react-hooks"),l=require("eslint-plugin-unused-imports");const c=r.config([s.configs.recommended,...r.configs.stylistic,...r.configs.stylisticTypeChecked,{rules:{"@typescript-eslint/consistent-type-definitions":["error","type"],"@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/no-explicit-any":"error"}}]),p=r.config([t.flatConfigs.recommended,t.flatConfigs.typescript,{rules:{"import/order":["error",{groups:["builtin","external","internal",["parent","sibling"]],pathGroups:[{pattern:"react",group:"external",position:"before"},{pattern:"@tarsilla/**",group:"internal",position:"before"}],pathGroupsExcludedImportTypes:["react","@tarsilla"],"newlines-between":"always",alphabetize:{order:"asc",caseInsensitive:!0}}]},settings:{"import/resolver":{typescript:!0,node:!0}}}]),a=r.config({files:["**/*.{cjs,mjs,js,jsx}"],extends:[r.configs.disableTypeChecked]}),u=r.config({files:["**/*.test.{js,ts,jsx,tsx}"],...i.configs["flat/recommended"]}),g=r.config([n,{rules:{...n.rules,"prettier/prettier":["error",{semi:!0,trailingComma:"all",singleQuote:!0,jsxSingleQuote:!0,printWidth:120,tabWidth:2},{usePrettierrc:!1,fileInfoOptions:{withNodeModules:!0}}]}}]),f=r.config({files:["**/*.{jsx,tsx}"],plugins:{"react-hooks":o},rules:{...o.configs.recommended.rules,"react/react-in-jsx-scope":"off","react/jsx-uses-react":"off"}}),d=r.config({rules:{"sort-imports":["error",{ignoreCase:!0,ignoreDeclarationSort:!0,ignoreMemberSort:!1}]}}),m=r.config({files:["**/*.{ts,tsx}"],languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module",project:!0,tsconfigRootDir:"./"}}}),x=r.config({plugins:{"unused-imports":l},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}]}});exports.eslintReactConfig=function({ignores:s}){return r.config({ignores:s},...c,...r.config({files:["**/*.{jsx,tsx}"],...e.configs.flat.recommended,...e.configs.flat["jsx-runtime"],settings:{react:{version:"detect"}}}),...f,...x,...d,...p,...m,...a,...u,...g)};
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/lib/react/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/react/eslintReactConfig.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/commons/all.ts","../../src/commons/imports.ts","../../src/commons/javascript.ts","../../src/commons/jest.ts","../../src/commons/prettier.ts","../../src/commons/react-hooks.ts","../../src/commons/sortImports.ts","../../src/commons/typescript.ts","../../src/commons/unusedImports.ts","../../src/react/eslintReactConfig.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport { config, configs } from 'typescript-eslint';\n\nconst allConfig: TSESLint.FlatConfig.ConfigArray = config([\n js.configs.recommended,\n ...configs.stylistic,\n ...configs.stylisticTypeChecked,\n {\n rules: {\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n },\n },\n]);\n\nexport { allConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport { config } from 'typescript-eslint';\n\nconst importsConfig: TSESLint.FlatConfig.ConfigArray = config([\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n {\n rules: {\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 pattern: '@tarsilla/**',\n group: 'internal',\n position: 'before',\n },\n ],\n pathGroupsExcludedImportTypes: ['react', '@tarsilla'],\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\nexport { importsConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport { config, configs } from 'typescript-eslint';\n\nconst javascriptConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.{cjs,mjs,js,jsx}'],\n extends: [configs.disableTypeChecked],\n});\n\nexport { javascriptConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport jest from 'eslint-plugin-jest';\nimport { config } from 'typescript-eslint';\n\nconst jestConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n});\n\nexport { jestConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport { config } from 'typescript-eslint';\n\nconst prettierConfig: TSESLint.FlatConfig.ConfigArray = config([\n prettierRecommended,\n {\n rules: {\n ...prettierRecommended.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 },\n },\n]);\n\nexport { prettierConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport reactHooks from 'eslint-plugin-react-hooks';\nimport { config } from 'typescript-eslint';\n\nconst reactHooksConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.{jsx,tsx}'],\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\nexport { reactHooksConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport { config } from 'typescript-eslint';\n\nconst sortImportsConfig: TSESLint.FlatConfig.ConfigArray = config({\n rules: {\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n },\n});\n\nexport { sortImportsConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport { config } from 'typescript-eslint';\n\nconst typescriptConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.{ts,tsx}'],\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n});\n\nexport { typescriptConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport { config } from 'typescript-eslint';\n\nconst unusedImportsConfig: TSESLint.FlatConfig.ConfigArray = config({\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n '@typescript-eslint/no-unused-vars': 'off',\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 },\n});\n\nexport { unusedImportsConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport reactPlugin from 'eslint-plugin-react';\nimport { config } from 'typescript-eslint';\n\nimport {\n allConfig,\n importsConfig,\n javascriptConfig,\n jestConfig,\n prettierConfig,\n reactHooksConfig,\n sortImportsConfig,\n typescriptConfig,\n unusedImportsConfig,\n} from '../commons/index.js';\nimport { EslintOptions } from '../types/index.js';\n\nfunction eslintReactConfig({ ignores }: EslintOptions): TSESLint.FlatConfig.ConfigArray {\n return config(\n {\n ignores,\n },\n ...allConfig,\n ...config({\n files: ['**/*.{jsx,tsx}'],\n ...reactPlugin.configs.flat.recommended,\n ...reactPlugin.configs.flat['jsx-runtime'],\n settings: {\n react: {\n version: 'detect',\n },\n },\n }),\n ...reactHooksConfig,\n ...unusedImportsConfig,\n ...sortImportsConfig,\n ...importsConfig,\n ...typescriptConfig,\n ...javascriptConfig,\n ...jestConfig,\n ...prettierConfig,\n );\n}\n\nexport { eslintReactConfig };\n"],"names":["allConfig","config","js","configs","recommended","stylistic","stylisticTypeChecked","rules","importsConfig","imports","flatConfigs","typescript","groups","pathGroups","pattern","group","position","pathGroupsExcludedImportTypes","alphabetize","order","caseInsensitive","settings","node","javascriptConfig","files","extends","disableTypeChecked","jestConfig","jest","prettierConfig","prettierRecommended","semi","trailingComma","singleQuote","jsxSingleQuote","printWidth","tabWidth","usePrettierrc","fileInfoOptions","withNodeModules","reactHooksConfig","plugins","reactHooks","sortImportsConfig","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","typescriptConfig","languageOptions","parserOptions","ecmaVersion","sourceType","project","tsconfigRootDir","unusedImportsConfig","unusedImports","vars","varsIgnorePattern","args","argsIgnorePattern","ignores","reactPlugin","flat","react","version"],"mappings":"4SAIA,MAAMA,EAA6CC,EAAAA,OAAO,CACxDC,EAAGC,QAAQC,eACRD,EAAAA,QAAQE,aACRF,EAAAA,QAAQG,qBACX,CACEC,MAAO,CACL,iDAAkD,CAAC,QAAS,QAC5D,oDAAqD,QACrD,qCAAsC,YCRtCC,EAAiDP,EAAAA,OAAO,CAC5DQ,EAAQC,YAAYN,YACpBK,EAAQC,YAAYC,WACpB,CACEJ,MAAO,CACL,eAAgB,CACd,QACA,CACEK,OAAQ,CAAC,UAAW,WAAY,WAAY,CAAC,SAAU,YACvDC,WAAY,CACV,CACEC,QAAS,QACTC,MAAO,WACPC,SAAU,UAEZ,CACEF,QAAS,eACTC,MAAO,WACPC,SAAU,WAGdC,8BAA+B,CAAC,QAAS,aACzC,mBAAoB,SACpBC,YAAa,CACXC,MAAO,MACPC,iBAAiB,MAKzBC,SAAU,CACR,kBAAmB,CACjBV,YAAY,EACZW,MAAM,OClCRC,EAAoDtB,EAAAA,OAAO,CAC/DuB,MAAO,CAAC,yBACRC,QAAS,CAACtB,UAAQuB,sBCDdC,EAA8C1B,EAAAA,OAAO,CACzDuB,MAAO,CAAC,gCACLI,EAAKzB,QAAQ,sBCFZ0B,EAAkD5B,EAAAA,OAAO,CAC7D6B,EACA,CACEvB,MAAO,IACFuB,EAAoBvB,MACvB,oBAAqB,CACnB,QACA,CACEwB,MAAM,EACNC,cAAe,MACfC,aAAa,EACbC,gBAAgB,EAChBC,WAAY,IACZC,SAAU,GAEZ,CACEC,eAAe,EACfC,gBAAiB,CACfC,iBAAiB,SClBvBC,EAAoDvC,EAAAA,OAAO,CAC/DuB,MAAO,CAAC,kBACRiB,QAAS,CACP,cAAeC,GAEjBnC,MAAO,IACFmC,EAAWvC,QAAQC,YAAYG,MAClC,2BAA4B,MAC5B,uBAAwB,SCTtBoC,EAAqD1C,EAAAA,OAAO,CAChEM,MAAO,CACL,eAAgB,CACd,QACA,CACEqC,YAAY,EACZC,uBAAuB,EACvBC,kBAAkB,OCPpBC,EAAoD9C,EAAAA,OAAO,CAC/DuB,MAAO,CAAC,iBACRwB,gBAAiB,CACfC,cAAe,CACbC,YAAa,SACbC,WAAY,SACZC,SAAS,EACTC,gBAAiB,SCNjBC,EAAuDrD,EAAAA,OAAO,CAClEwC,QAAS,CACP,iBAAkBc,GAEpBhD,MAAO,CACL,oCAAqC,MACrC,iBAAkB,MAClB,mCAAoC,QACpC,gCAAiC,CAC/B,QACA,CACEiD,KAAM,MACNC,kBAAmB,KACnBC,KAAM,aACNC,kBAAmB,oCCD3B,UAA2BC,QAAEA,IAC3B,OAAO3D,SACL,CACE2D,cAEC5D,KACAC,SAAO,CACRuB,MAAO,CAAC,qBACLqC,EAAY1D,QAAQ2D,KAAK1D,eACzByD,EAAY1D,QAAQ2D,KAAK,eAC5BzC,SAAU,CACR0C,MAAO,CACLC,QAAS,gBAIZxB,KACAc,KACAX,KACAnC,KACAuC,KACAxB,KACAI,KACAE,EAEP"}
|
package/lib/react/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"
|
|
1
|
+
import e from"eslint-plugin-react";import{config as r,configs as t}from"typescript-eslint";import s from"@eslint/js";import i from"eslint-plugin-import";import o from"eslint-plugin-jest";import n from"eslint-plugin-prettier/recommended";import p from"eslint-plugin-react-hooks";import l from"eslint-plugin-unused-imports";const a=r([s.configs.recommended,...t.stylistic,...t.stylisticTypeChecked,{rules:{"@typescript-eslint/consistent-type-definitions":["error","type"],"@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/no-explicit-any":"error"}}]),u=r([i.flatConfigs.recommended,i.flatConfigs.typescript,{rules:{"import/order":["error",{groups:["builtin","external","internal",["parent","sibling"]],pathGroups:[{pattern:"react",group:"external",position:"before"},{pattern:"@tarsilla/**",group:"internal",position:"before"}],pathGroupsExcludedImportTypes:["react","@tarsilla"],"newlines-between":"always",alphabetize:{order:"asc",caseInsensitive:!0}}]},settings:{"import/resolver":{typescript:!0,node:!0}}}]),c=r({files:["**/*.{cjs,mjs,js,jsx}"],extends:[t.disableTypeChecked]}),m=r({files:["**/*.test.{js,ts,jsx,tsx}"],...o.configs["flat/recommended"]}),f=r([n,{rules:{...n.rules,"prettier/prettier":["error",{semi:!0,trailingComma:"all",singleQuote:!0,jsxSingleQuote:!0,printWidth:120,tabWidth:2},{usePrettierrc:!1,fileInfoOptions:{withNodeModules:!0}}]}}]),d=r({files:["**/*.{jsx,tsx}"],plugins:{"react-hooks":p},rules:{...p.configs.recommended.rules,"react/react-in-jsx-scope":"off","react/jsx-uses-react":"off"}}),g=r({rules:{"sort-imports":["error",{ignoreCase:!0,ignoreDeclarationSort:!0,ignoreMemberSort:!1}]}}),x=r({files:["**/*.{ts,tsx}"],languageOptions:{parserOptions:{ecmaVersion:"latest",sourceType:"module",project:!0,tsconfigRootDir:"./"}}}),y=r({plugins:{"unused-imports":l},rules:{"@typescript-eslint/no-unused-vars":"off","no-unused-vars":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}]}});function j({ignores:t}){return r({ignores:t},...a,...r({files:["**/*.{jsx,tsx}"],...e.configs.flat.recommended,...e.configs.flat["jsx-runtime"],settings:{react:{version:"detect"}}}),...d,...y,...g,...u,...x,...c,...m,...f)}export{j as eslintReactConfig};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/lib/react/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/react/eslintReactConfig.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/commons/all.ts","../../src/commons/imports.ts","../../src/commons/javascript.ts","../../src/commons/jest.ts","../../src/commons/prettier.ts","../../src/commons/react-hooks.ts","../../src/commons/sortImports.ts","../../src/commons/typescript.ts","../../src/commons/unusedImports.ts","../../src/react/eslintReactConfig.ts"],"sourcesContent":["import js from '@eslint/js';\nimport type { TSESLint } from '@typescript-eslint/utils';\nimport { config, configs } from 'typescript-eslint';\n\nconst allConfig: TSESLint.FlatConfig.ConfigArray = config([\n js.configs.recommended,\n ...configs.stylistic,\n ...configs.stylisticTypeChecked,\n {\n rules: {\n '@typescript-eslint/consistent-type-definitions': ['error', 'type'],\n '@typescript-eslint/explicit-module-boundary-types': 'error',\n '@typescript-eslint/no-explicit-any': 'error',\n },\n },\n]);\n\nexport { allConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport imports from 'eslint-plugin-import';\nimport { config } from 'typescript-eslint';\n\nconst importsConfig: TSESLint.FlatConfig.ConfigArray = config([\n imports.flatConfigs.recommended,\n imports.flatConfigs.typescript,\n {\n rules: {\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 pattern: '@tarsilla/**',\n group: 'internal',\n position: 'before',\n },\n ],\n pathGroupsExcludedImportTypes: ['react', '@tarsilla'],\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\nexport { importsConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport { config, configs } from 'typescript-eslint';\n\nconst javascriptConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.{cjs,mjs,js,jsx}'],\n extends: [configs.disableTypeChecked],\n});\n\nexport { javascriptConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport jest from 'eslint-plugin-jest';\nimport { config } from 'typescript-eslint';\n\nconst jestConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.test.{js,ts,jsx,tsx}'],\n ...jest.configs['flat/recommended'],\n});\n\nexport { jestConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport prettierRecommended from 'eslint-plugin-prettier/recommended';\nimport { config } from 'typescript-eslint';\n\nconst prettierConfig: TSESLint.FlatConfig.ConfigArray = config([\n prettierRecommended,\n {\n rules: {\n ...prettierRecommended.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 },\n },\n]);\n\nexport { prettierConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport reactHooks from 'eslint-plugin-react-hooks';\nimport { config } from 'typescript-eslint';\n\nconst reactHooksConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.{jsx,tsx}'],\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\nexport { reactHooksConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport { config } from 'typescript-eslint';\n\nconst sortImportsConfig: TSESLint.FlatConfig.ConfigArray = config({\n rules: {\n 'sort-imports': [\n 'error',\n {\n ignoreCase: true,\n ignoreDeclarationSort: true,\n ignoreMemberSort: false,\n },\n ],\n },\n});\n\nexport { sortImportsConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport { config } from 'typescript-eslint';\n\nconst typescriptConfig: TSESLint.FlatConfig.ConfigArray = config({\n files: ['**/*.{ts,tsx}'],\n languageOptions: {\n parserOptions: {\n ecmaVersion: 'latest',\n sourceType: 'module',\n project: true,\n tsconfigRootDir: './',\n },\n },\n});\n\nexport { typescriptConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport unusedImports from 'eslint-plugin-unused-imports';\nimport { config } from 'typescript-eslint';\n\nconst unusedImportsConfig: TSESLint.FlatConfig.ConfigArray = config({\n plugins: {\n 'unused-imports': unusedImports,\n },\n rules: {\n '@typescript-eslint/no-unused-vars': 'off',\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 },\n});\n\nexport { unusedImportsConfig };\n","import type { TSESLint } from '@typescript-eslint/utils';\nimport reactPlugin from 'eslint-plugin-react';\nimport { config } from 'typescript-eslint';\n\nimport {\n allConfig,\n importsConfig,\n javascriptConfig,\n jestConfig,\n prettierConfig,\n reactHooksConfig,\n sortImportsConfig,\n typescriptConfig,\n unusedImportsConfig,\n} from '../commons/index.js';\nimport { EslintOptions } from '../types/index.js';\n\nfunction eslintReactConfig({ ignores }: EslintOptions): TSESLint.FlatConfig.ConfigArray {\n return config(\n {\n ignores,\n },\n ...allConfig,\n ...config({\n files: ['**/*.{jsx,tsx}'],\n ...reactPlugin.configs.flat.recommended,\n ...reactPlugin.configs.flat['jsx-runtime'],\n settings: {\n react: {\n version: 'detect',\n },\n },\n }),\n ...reactHooksConfig,\n ...unusedImportsConfig,\n ...sortImportsConfig,\n ...importsConfig,\n ...typescriptConfig,\n ...javascriptConfig,\n ...jestConfig,\n ...prettierConfig,\n );\n}\n\nexport { eslintReactConfig };\n"],"names":["allConfig","config","js","configs","recommended","stylistic","stylisticTypeChecked","rules","importsConfig","imports","flatConfigs","typescript","groups","pathGroups","pattern","group","position","pathGroupsExcludedImportTypes","alphabetize","order","caseInsensitive","settings","node","javascriptConfig","files","extends","disableTypeChecked","jestConfig","jest","prettierConfig","prettierRecommended","semi","trailingComma","singleQuote","jsxSingleQuote","printWidth","tabWidth","usePrettierrc","fileInfoOptions","withNodeModules","reactHooksConfig","plugins","reactHooks","sortImportsConfig","ignoreCase","ignoreDeclarationSort","ignoreMemberSort","typescriptConfig","languageOptions","parserOptions","ecmaVersion","sourceType","project","tsconfigRootDir","unusedImportsConfig","unusedImports","vars","varsIgnorePattern","args","argsIgnorePattern","eslintReactConfig","ignores","reactPlugin","flat","react","version"],"mappings":"kUAIA,MAAMA,EAA6CC,EAAO,CACxDC,EAAGC,QAAQC,eACRD,EAAQE,aACRF,EAAQG,qBACX,CACEC,MAAO,CACL,iDAAkD,CAAC,QAAS,QAC5D,oDAAqD,QACrD,qCAAsC,YCRtCC,EAAiDP,EAAO,CAC5DQ,EAAQC,YAAYN,YACpBK,EAAQC,YAAYC,WACpB,CACEJ,MAAO,CACL,eAAgB,CACd,QACA,CACEK,OAAQ,CAAC,UAAW,WAAY,WAAY,CAAC,SAAU,YACvDC,WAAY,CACV,CACEC,QAAS,QACTC,MAAO,WACPC,SAAU,UAEZ,CACEF,QAAS,eACTC,MAAO,WACPC,SAAU,WAGdC,8BAA+B,CAAC,QAAS,aACzC,mBAAoB,SACpBC,YAAa,CACXC,MAAO,MACPC,iBAAiB,MAKzBC,SAAU,CACR,kBAAmB,CACjBV,YAAY,EACZW,MAAM,OClCRC,EAAoDtB,EAAO,CAC/DuB,MAAO,CAAC,yBACRC,QAAS,CAACtB,EAAQuB,sBCDdC,EAA8C1B,EAAO,CACzDuB,MAAO,CAAC,gCACLI,EAAKzB,QAAQ,sBCFZ0B,EAAkD5B,EAAO,CAC7D6B,EACA,CACEvB,MAAO,IACFuB,EAAoBvB,MACvB,oBAAqB,CACnB,QACA,CACEwB,MAAM,EACNC,cAAe,MACfC,aAAa,EACbC,gBAAgB,EAChBC,WAAY,IACZC,SAAU,GAEZ,CACEC,eAAe,EACfC,gBAAiB,CACfC,iBAAiB,SClBvBC,EAAoDvC,EAAO,CAC/DuB,MAAO,CAAC,kBACRiB,QAAS,CACP,cAAeC,GAEjBnC,MAAO,IACFmC,EAAWvC,QAAQC,YAAYG,MAClC,2BAA4B,MAC5B,uBAAwB,SCTtBoC,EAAqD1C,EAAO,CAChEM,MAAO,CACL,eAAgB,CACd,QACA,CACEqC,YAAY,EACZC,uBAAuB,EACvBC,kBAAkB,OCPpBC,EAAoD9C,EAAO,CAC/DuB,MAAO,CAAC,iBACRwB,gBAAiB,CACfC,cAAe,CACbC,YAAa,SACbC,WAAY,SACZC,SAAS,EACTC,gBAAiB,SCNjBC,EAAuDrD,EAAO,CAClEwC,QAAS,CACP,iBAAkBc,GAEpBhD,MAAO,CACL,oCAAqC,MACrC,iBAAkB,MAClB,mCAAoC,QACpC,gCAAiC,CAC/B,QACA,CACEiD,KAAM,MACNC,kBAAmB,KACnBC,KAAM,aACNC,kBAAmB,UCD3B,SAASC,GAAkBC,QAAEA,IAC3B,OAAO5D,EACL,CACE4D,cAEC7D,KACAC,EAAO,CACRuB,MAAO,CAAC,qBACLsC,EAAY3D,QAAQ4D,KAAK3D,eACzB0D,EAAY3D,QAAQ4D,KAAK,eAC5B1C,SAAU,CACR2C,MAAO,CACLC,QAAS,gBAIZzB,KACAc,KACAX,KACAnC,KACAuC,KACAxB,KACAI,KACAE,EAEP"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarsilla/eslint-config",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@eslint/eslintrc": "^3.3.0",
|
|
61
|
-
"@eslint/js": "^9.
|
|
62
|
-
"@types/node": "^22.13.
|
|
63
|
-
"eslint-config-next": "^15.2.
|
|
64
|
-
"eslint-config-prettier": "^10.
|
|
65
|
-
"eslint-import-resolver-typescript": "^3.8.
|
|
61
|
+
"@eslint/js": "^9.22.0",
|
|
62
|
+
"@types/node": "^22.13.10",
|
|
63
|
+
"eslint-config-next": "^15.2.2",
|
|
64
|
+
"eslint-config-prettier": "^10.1.1",
|
|
65
|
+
"eslint-import-resolver-typescript": "^3.8.6",
|
|
66
66
|
"eslint-plugin-import": "^2.31.0",
|
|
67
67
|
"eslint-plugin-jest": "^28.11.0",
|
|
68
68
|
"eslint-plugin-prettier": "^5.2.3",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
71
71
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
72
72
|
"prettier": "^3.5.3",
|
|
73
|
-
"typescript-eslint": "^8.26.
|
|
73
|
+
"typescript-eslint": "^8.26.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@commitlint/cli": "^19.
|
|
77
|
-
"@commitlint/config-conventional": "^19.
|
|
76
|
+
"@commitlint/cli": "^19.8.0",
|
|
77
|
+
"@commitlint/config-conventional": "^19.8.0",
|
|
78
78
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
79
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
79
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
80
80
|
"@rollup/plugin-swc": "^0.4.0",
|
|
81
81
|
"@rollup/plugin-terser": "^0.4.4",
|
|
82
82
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@semantic-release/release-notes-generator": "^14.0.3",
|
|
87
87
|
"cz-conventional-changelog": "^3.3.0",
|
|
88
88
|
"husky": "^9.1.7",
|
|
89
|
-
"rollup": "^4.
|
|
89
|
+
"rollup": "^4.35.0",
|
|
90
90
|
"rollup-plugin-dts": "^6.1.1",
|
|
91
91
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
92
92
|
"semantic-release": "^24.2.3",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
3
|
+
import { config, configs } from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
const allConfig: TSESLint.FlatConfig.ConfigArray = config([
|
|
6
|
+
js.configs.recommended,
|
|
7
|
+
...configs.stylistic,
|
|
8
|
+
...configs.stylisticTypeChecked,
|
|
9
|
+
{
|
|
10
|
+
rules: {
|
|
11
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
12
|
+
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
13
|
+
'@typescript-eslint/no-explicit-any': 'error',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
export { allConfig };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import imports from 'eslint-plugin-import';
|
|
3
|
+
import { config } from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
const importsConfig: TSESLint.FlatConfig.ConfigArray = config([
|
|
6
|
+
imports.flatConfigs.recommended,
|
|
7
|
+
imports.flatConfigs.typescript,
|
|
8
|
+
{
|
|
9
|
+
rules: {
|
|
10
|
+
'import/order': [
|
|
11
|
+
'error',
|
|
12
|
+
{
|
|
13
|
+
groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],
|
|
14
|
+
pathGroups: [
|
|
15
|
+
{
|
|
16
|
+
pattern: 'react',
|
|
17
|
+
group: 'external',
|
|
18
|
+
position: 'before',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
pattern: '@tarsilla/**',
|
|
22
|
+
group: 'internal',
|
|
23
|
+
position: 'before',
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
pathGroupsExcludedImportTypes: ['react', '@tarsilla'],
|
|
27
|
+
'newlines-between': 'always',
|
|
28
|
+
alphabetize: {
|
|
29
|
+
order: 'asc',
|
|
30
|
+
caseInsensitive: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
settings: {
|
|
36
|
+
'import/resolver': {
|
|
37
|
+
typescript: true,
|
|
38
|
+
node: true,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
export { importsConfig };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './all.js';
|
|
2
|
+
export * from './imports.js';
|
|
3
|
+
export * from './javascript.js';
|
|
4
|
+
export * from './jest.js';
|
|
5
|
+
export * from './prettier.js';
|
|
6
|
+
export * from './react-hooks.js';
|
|
7
|
+
export * from './sortImports.js';
|
|
8
|
+
export * from './typescript.js';
|
|
9
|
+
export * from './unusedImports.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import { config, configs } from 'typescript-eslint';
|
|
3
|
+
|
|
4
|
+
const javascriptConfig: TSESLint.FlatConfig.ConfigArray = config({
|
|
5
|
+
files: ['**/*.{cjs,mjs,js,jsx}'],
|
|
6
|
+
extends: [configs.disableTypeChecked],
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { javascriptConfig };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import jest from 'eslint-plugin-jest';
|
|
3
|
+
import { config } from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
const jestConfig: TSESLint.FlatConfig.ConfigArray = config({
|
|
6
|
+
files: ['**/*.test.{js,ts,jsx,tsx}'],
|
|
7
|
+
...jest.configs['flat/recommended'],
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { jestConfig };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
3
|
+
import { config } from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
const prettierConfig: TSESLint.FlatConfig.ConfigArray = config([
|
|
6
|
+
prettierRecommended,
|
|
7
|
+
{
|
|
8
|
+
rules: {
|
|
9
|
+
...prettierRecommended.rules,
|
|
10
|
+
'prettier/prettier': [
|
|
11
|
+
'error',
|
|
12
|
+
{
|
|
13
|
+
semi: true,
|
|
14
|
+
trailingComma: 'all',
|
|
15
|
+
singleQuote: true,
|
|
16
|
+
jsxSingleQuote: true,
|
|
17
|
+
printWidth: 120,
|
|
18
|
+
tabWidth: 2,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
usePrettierrc: false,
|
|
22
|
+
fileInfoOptions: {
|
|
23
|
+
withNodeModules: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
export { prettierConfig };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
3
|
+
import { config } from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
const reactHooksConfig: TSESLint.FlatConfig.ConfigArray = config({
|
|
6
|
+
files: ['**/*.{jsx,tsx}'],
|
|
7
|
+
plugins: {
|
|
8
|
+
'react-hooks': reactHooks,
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
...reactHooks.configs.recommended.rules,
|
|
12
|
+
'react/react-in-jsx-scope': 'off',
|
|
13
|
+
'react/jsx-uses-react': 'off',
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export { reactHooksConfig };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import { config } from 'typescript-eslint';
|
|
3
|
+
|
|
4
|
+
const sortImportsConfig: TSESLint.FlatConfig.ConfigArray = config({
|
|
5
|
+
rules: {
|
|
6
|
+
'sort-imports': [
|
|
7
|
+
'error',
|
|
8
|
+
{
|
|
9
|
+
ignoreCase: true,
|
|
10
|
+
ignoreDeclarationSort: true,
|
|
11
|
+
ignoreMemberSort: false,
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export { sortImportsConfig };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import { config } from 'typescript-eslint';
|
|
3
|
+
|
|
4
|
+
const typescriptConfig: TSESLint.FlatConfig.ConfigArray = config({
|
|
5
|
+
files: ['**/*.{ts,tsx}'],
|
|
6
|
+
languageOptions: {
|
|
7
|
+
parserOptions: {
|
|
8
|
+
ecmaVersion: 'latest',
|
|
9
|
+
sourceType: 'module',
|
|
10
|
+
project: true,
|
|
11
|
+
tsconfigRootDir: './',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { typescriptConfig };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import unusedImports from 'eslint-plugin-unused-imports';
|
|
3
|
+
import { config } from 'typescript-eslint';
|
|
4
|
+
|
|
5
|
+
const unusedImportsConfig: TSESLint.FlatConfig.ConfigArray = config({
|
|
6
|
+
plugins: {
|
|
7
|
+
'unused-imports': unusedImports,
|
|
8
|
+
},
|
|
9
|
+
rules: {
|
|
10
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
11
|
+
'no-unused-vars': 'off',
|
|
12
|
+
'unused-imports/no-unused-imports': 'error',
|
|
13
|
+
'unused-imports/no-unused-vars': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
vars: 'all',
|
|
17
|
+
varsIgnorePattern: '^_',
|
|
18
|
+
args: 'after-used',
|
|
19
|
+
argsIgnorePattern: '^_',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { unusedImportsConfig };
|
|
@@ -1,129 +1,31 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
1
|
import type { TSESLint } from '@typescript-eslint/utils';
|
|
3
|
-
import
|
|
4
|
-
import jest from 'eslint-plugin-jest';
|
|
5
|
-
import prettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
6
|
-
import unusedImports from 'eslint-plugin-unused-imports';
|
|
7
|
-
import globalsImp from 'globals';
|
|
8
|
-
import { config, configs } from 'typescript-eslint';
|
|
2
|
+
import { config } from 'typescript-eslint';
|
|
9
3
|
|
|
4
|
+
import {
|
|
5
|
+
allConfig,
|
|
6
|
+
importsConfig,
|
|
7
|
+
javascriptConfig,
|
|
8
|
+
jestConfig,
|
|
9
|
+
prettierConfig,
|
|
10
|
+
sortImportsConfig,
|
|
11
|
+
typescriptConfig,
|
|
12
|
+
unusedImportsConfig,
|
|
13
|
+
} from '../commons/index.js';
|
|
10
14
|
import { EslintOptions } from '../types/index.js';
|
|
11
15
|
|
|
12
|
-
const globals = globalsImp as Record<string, Record<string, boolean>>;
|
|
13
|
-
|
|
14
16
|
function eslintLibraryConfig({ ignores }: EslintOptions): TSESLint.FlatConfig.ConfigArray {
|
|
15
17
|
return config(
|
|
16
|
-
js.configs.recommended,
|
|
17
|
-
imports.flatConfigs.recommended,
|
|
18
|
-
imports.flatConfigs.typescript,
|
|
19
|
-
...configs.stylistic,
|
|
20
|
-
...configs.stylisticTypeChecked,
|
|
21
|
-
{
|
|
22
|
-
files: ['**/*.ts'],
|
|
23
|
-
languageOptions: {
|
|
24
|
-
parserOptions: {
|
|
25
|
-
ecmaVersion: 'latest',
|
|
26
|
-
sourceType: 'module',
|
|
27
|
-
project: true,
|
|
28
|
-
tsconfigRootDir: './',
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
rules: {
|
|
32
|
-
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
33
|
-
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
|
34
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
|
35
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
files: ['**/*.{js,mjs}'],
|
|
40
|
-
extends: [configs.disableTypeChecked],
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
files: ['**/*.test.{js,ts}'],
|
|
44
|
-
...jest.configs['flat/recommended'],
|
|
45
|
-
languageOptions: {
|
|
46
|
-
globals: {
|
|
47
|
-
...globals.jest,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
prettierRecommended,
|
|
52
18
|
{
|
|
53
19
|
ignores,
|
|
54
20
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
semi: true,
|
|
64
|
-
trailingComma: 'all',
|
|
65
|
-
singleQuote: true,
|
|
66
|
-
printWidth: 120,
|
|
67
|
-
tabWidth: 2,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
usePrettierrc: false,
|
|
71
|
-
fileInfoOptions: {
|
|
72
|
-
withNodeModules: true,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
'no-unused-vars': 'off',
|
|
77
|
-
'unused-imports/no-unused-imports': 'error',
|
|
78
|
-
'unused-imports/no-unused-vars': [
|
|
79
|
-
'error',
|
|
80
|
-
{
|
|
81
|
-
vars: 'all',
|
|
82
|
-
varsIgnorePattern: '^_',
|
|
83
|
-
args: 'after-used',
|
|
84
|
-
argsIgnorePattern: '^_',
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
'sort-imports': [
|
|
88
|
-
'error',
|
|
89
|
-
{
|
|
90
|
-
ignoreCase: true,
|
|
91
|
-
ignoreDeclarationSort: true,
|
|
92
|
-
ignoreMemberSort: false,
|
|
93
|
-
},
|
|
94
|
-
],
|
|
95
|
-
'import/order': [
|
|
96
|
-
'error',
|
|
97
|
-
{
|
|
98
|
-
groups: ['builtin', 'external', 'internal', ['parent', 'sibling']],
|
|
99
|
-
pathGroups: [
|
|
100
|
-
{
|
|
101
|
-
pattern: 'react',
|
|
102
|
-
group: 'external',
|
|
103
|
-
position: 'before',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
pattern: '@tarsilla/**',
|
|
107
|
-
group: 'internal',
|
|
108
|
-
position: 'before',
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
pathGroupsExcludedImportTypes: ['react', '@tarsilla'],
|
|
112
|
-
'newlines-between': 'always',
|
|
113
|
-
alphabetize: {
|
|
114
|
-
order: 'asc',
|
|
115
|
-
caseInsensitive: true,
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
settings: {
|
|
121
|
-
'import/resolver': {
|
|
122
|
-
typescript: true,
|
|
123
|
-
node: true,
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
21
|
+
...allConfig,
|
|
22
|
+
...unusedImportsConfig,
|
|
23
|
+
...sortImportsConfig,
|
|
24
|
+
...importsConfig,
|
|
25
|
+
...typescriptConfig,
|
|
26
|
+
...javascriptConfig,
|
|
27
|
+
...jestConfig,
|
|
28
|
+
...prettierConfig,
|
|
127
29
|
);
|
|
128
30
|
}
|
|
129
31
|
|