eslint-config-gorgon 2.0.1 → 2.0.2
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.d.ts +18 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TSESLint } from '@typescript-eslint/utils';
|
|
2
2
|
import eslint from 'eslint';
|
|
3
3
|
|
|
4
|
-
declare const initialConfigs: eslint.Linter.Config[];
|
|
5
4
|
type InitConfigProps = {
|
|
6
5
|
a11y?: boolean;
|
|
7
6
|
ignores?: string[];
|
|
@@ -11,6 +10,23 @@ type InitConfigProps = {
|
|
|
11
10
|
typescript?: boolean;
|
|
12
11
|
};
|
|
13
12
|
type InitConfigReturnType = eslint.Linter.Config | TSESLint.FlatConfig.Config;
|
|
13
|
+
/** ### Initialize Configs
|
|
14
|
+
* @example
|
|
15
|
+
* ```js
|
|
16
|
+
* import gorgon from "eslint-config-gorgon";
|
|
17
|
+
* export default gorgon;
|
|
18
|
+
* ```
|
|
19
|
+
* or
|
|
20
|
+
* ```js
|
|
21
|
+
* import { init } from "eslint-config-gorgon";
|
|
22
|
+
* export default init({
|
|
23
|
+
* a11y: true,
|
|
24
|
+
* prettier: true,
|
|
25
|
+
* tailwind: true,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
14
29
|
declare const init: (configs?: InitConfigProps) => InitConfigReturnType[];
|
|
30
|
+
declare const _default: InitConfigReturnType[];
|
|
15
31
|
|
|
16
|
-
export {
|
|
32
|
+
export { _default as default, init };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var h=Object.create;var u=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var E=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var P=(o,e,f,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of T(e))!R.call(o,i)&&i!==f&&u(o,i,{get:()=>e[i],enumerable:!(n=C(e,i))||n.enumerable});return o};var q=(o,e,f)=>(f=o!=null?h(S(o)):{},P(e||!o||!o.__esModule?u(f,"default",{value:o,enumerable:!0}):f,o));var y=E((Z,m)=>{"use strict";var L=!process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED,t=0;m.exports={rules:{curly:t,"no-unexpected-multiline":t,"@typescript-eslint/lines-around-comment":t,"@typescript-eslint/quotes":t,"babel/quotes":t,"unicorn/template-indent":t,"vue/html-self-closing":t,"vue/max-len":t,"@babel/object-curly-spacing":"off","@babel/semi":"off","@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off","babel/object-curly-spacing":"off","babel/semi":"off","flowtype/boolean-style":"off","flowtype/delimiter-dangle":"off","flowtype/generic-spacing":"off","flowtype/object-type-curly-spacing":"off","flowtype/object-type-delimiter":"off","flowtype/quotes":"off","flowtype/semi":"off","flowtype/space-after-type-colon":"off","flowtype/space-before-generic-bracket":"off","flowtype/space-before-type-colon":"off","flowtype/union-intersection-spacing":"off","react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off","standard/array-bracket-even-spacing":"off","standard/computed-property-even-spacing":"off","standard/object-curly-even-spacing":"off","unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","vue/array-bracket-newline":"off","vue/array-bracket-spacing":"off","vue/array-element-newline":"off","vue/arrow-spacing":"off","vue/block-spacing":"off","vue/block-tag-newline":"off","vue/brace-style":"off","vue/comma-dangle":"off","vue/comma-spacing":"off","vue/comma-style":"off","vue/dot-location":"off","vue/func-call-spacing":"off","vue/html-closing-bracket-newline":"off","vue/html-closing-bracket-spacing":"off","vue/html-end-tags":"off","vue/html-indent":"off","vue/html-quotes":"off","vue/key-spacing":"off","vue/keyword-spacing":"off","vue/max-attributes-per-line":"off","vue/multiline-html-element-content-newline":"off","vue/multiline-ternary":"off","vue/mustache-interpolation-spacing":"off","vue/no-extra-parens":"off","vue/no-multi-spaces":"off","vue/no-spaces-around-equal-signs-in-attribute":"off","vue/object-curly-newline":"off","vue/object-curly-spacing":"off","vue/object-property-newline":"off","vue/operator-linebreak":"off","vue/quote-props":"off","vue/script-indent":"off","vue/singleline-html-element-content-newline":"off","vue/space-in-parens":"off","vue/space-infix-ops":"off","vue/space-unary-ops":"off","vue/template-curly-spacing":"off",...L&&{"space-unary-word-ops":"off","generator-star":"off","no-comma-dangle":"off","no-reserved-keys":"off","no-space-before-semi":"off","no-wrap-func":"off","space-after-function-name":"off","space-before-function-parentheses":"off","space-in-brackets":"off","no-arrow-condition":"off","space-after-keywords":"off","space-before-keywords":"off","space-return-throw-case":"off","no-spaced-func":"off","indent-legacy":"off","array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off","dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","lines-around-comment":t,"max-len":t,"max-statements-per-line":"off","multiline-ternary":"off","new-parens":"off","newline-per-chained-call":"off","no-confusing-arrow":t,"no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-operators":t,"no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-tabs":t,"no-trailing-spaces":"off","no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off","quote-props":"off",quotes:t,"rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off","react/jsx-space-before-closing":"off"}}}});import I from"eslint-plugin-perfectionist";var s=[I.configs["recommended-natural"],{rules:{"no-console":"warn","no-unused-vars":"warn","perfectionist/sort-enums":"warn"}}];import F from"eslint-plugin-jsx-a11y";var r=[F.flatConfigs.recommended];var d=q(y(),1);import H from"eslint-plugin-prettier/recommended";var a=[H,d.default];import D from"eslint-plugin-tailwindcss";var c=[...D.configs["flat/recommended"]];import _ from"typescript-eslint";var p=[..._.configs.recommended,{rules:{"@typescript-eslint/no-explicit-any":"warn"}}];import g from"fs";import N from"path";var A=()=>{let o=N.join(process.cwd(),"package.json");if(g.existsSync(o)){let e=JSON.parse(g.readFileSync(o,"utf-8")),f=e.dependencies||{},n=e.devDependencies||{};return"react"in f||"react"in n}return!1},b=A;import J from"fs";import O from"path";var G=()=>["tailwind.config.js","tailwind.config.cjs","tailwind.config.mjs","tailwind.config.ts","tailwind.config.mts"].some(f=>J.existsSync(O.join(process.cwd(),f))),w=G;import z from"fs";import B from"path";var K=B.join(process.cwd(),"tsconfig.json"),M=()=>z.existsSync(K),x=M;var l=b(),v=w(),j=x();var k=[...s],Q=o=>{let e=k;if((o?.a11y??l)&&e.push(...r),(o?.tailwind??v)&&e.push(...c),(o?.prettier??l)&&e.push(...a),o?.typescript??j){let f=["**/node_modules/**","dist/**","output/**"];e=[...k,...p].map(n=>({...n,files:["**/*.ts","**/*.tsx",...n?.files?.flat(1/0)??[]],ignores:[...f,...o?.ignores??[]]}))}return e},Se=Q();export{Se as default,Q as init};
|