eslint-config-standard-kit
Advanced tools
Comparing version 0.14.4 to 0.14.5
# eslint-config-standard-kit | ||
## 0.14.5 (2020-11-24) | ||
- Update documentation. | ||
- Improve unit-testing & other internal code-quality tooling. | ||
- Update the configuration web page: | ||
- Require compatible dependency versions (using `^`) in the generated `package.json`. | ||
- Add a `fix` script to the generated `package.json`. | ||
- Add a `typescript` dependency when necessary. | ||
- Show the current `eslint-config-standard-kit` version number. | ||
- Add a visual shadow the the buttons. | ||
## 0.14.4 (2019-10-17) | ||
@@ -4,0 +15,0 @@ |
@@ -9,6 +9,6 @@ // Flow language support for Standard.js | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"flowtype" | ||
], | ||
"parser": "babel-eslint", | ||
"rules": { | ||
@@ -15,0 +15,0 @@ "flowtype/boolean-style": [ |
178
index.js
@@ -9,12 +9,22 @@ // Core rules for Standard.js | ||
module.exports = { | ||
"env": { | ||
"es6": true | ||
}, | ||
"globals": { | ||
"clearInterval": "readonly", | ||
"clearTimeout": "readonly", | ||
"console": "readonly", | ||
"document": "readonly", | ||
"navigator": "readonly", | ||
"setInterval": "readonly", | ||
"setTimeout": "readonly", | ||
"window": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true | ||
}, | ||
"plugins": [ | ||
@@ -25,12 +35,2 @@ "import", | ||
], | ||
"globals": { | ||
"clearInterval": "readonly", | ||
"clearTimeout": "readonly", | ||
"console": "readonly", | ||
"setInterval": "readonly", | ||
"setTimeout": "readonly", | ||
"document": "readonly", | ||
"navigator": "readonly", | ||
"window": "readonly" | ||
}, | ||
"rules": { | ||
@@ -45,4 +45,4 @@ "accessor-pairs": "error", | ||
{ | ||
"before": true, | ||
"after": true | ||
"after": true, | ||
"before": true | ||
} | ||
@@ -71,6 +71,6 @@ ], | ||
"arrays": "never", | ||
"objects": "never", | ||
"exports": "never", | ||
"functions": "never", | ||
"imports": "never", | ||
"exports": "never", | ||
"functions": "never" | ||
"objects": "never" | ||
} | ||
@@ -81,4 +81,4 @@ ], | ||
{ | ||
"before": false, | ||
"after": true | ||
"after": true, | ||
"before": false | ||
} | ||
@@ -124,4 +124,4 @@ ], | ||
{ | ||
"before": true, | ||
"after": true | ||
"after": true, | ||
"before": true | ||
} | ||
@@ -133,2 +133,15 @@ ], | ||
], | ||
"import/export": "error", | ||
"import/first": "error", | ||
"import/no-absolute-path": [ | ||
"error", | ||
{ | ||
"amd": false, | ||
"commonjs": true, | ||
"esmodule": true | ||
} | ||
], | ||
"import/no-duplicates": "error", | ||
"import/no-named-default": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"indent": [ | ||
@@ -138,20 +151,19 @@ "error", | ||
{ | ||
"SwitchCase": 1, | ||
"VariableDeclarator": 1, | ||
"outerIIFEBody": 1, | ||
"MemberExpression": 1, | ||
"ArrayExpression": 1, | ||
"CallExpression": { | ||
"arguments": 1 | ||
}, | ||
"FunctionDeclaration": { | ||
"parameters": 1, | ||
"body": 1 | ||
"body": 1, | ||
"parameters": 1 | ||
}, | ||
"FunctionExpression": { | ||
"parameters": 1, | ||
"body": 1 | ||
"body": 1, | ||
"parameters": 1 | ||
}, | ||
"CallExpression": { | ||
"arguments": 1 | ||
}, | ||
"ArrayExpression": 1, | ||
"ImportDeclaration": 1, | ||
"MemberExpression": 1, | ||
"ObjectExpression": 1, | ||
"ImportDeclaration": 1, | ||
"SwitchCase": 1, | ||
"VariableDeclarator": 1, | ||
"flatTernaryExpressions": false, | ||
@@ -161,3 +173,4 @@ "ignoreComments": false, | ||
"TemplateLiteral *" | ||
] | ||
], | ||
"outerIIFEBody": 1 | ||
} | ||
@@ -168,4 +181,4 @@ ], | ||
{ | ||
"beforeColon": false, | ||
"afterColon": true | ||
"afterColon": true, | ||
"beforeColon": false | ||
} | ||
@@ -176,4 +189,4 @@ ], | ||
{ | ||
"before": true, | ||
"after": true | ||
"after": true, | ||
"before": true | ||
} | ||
@@ -191,4 +204,4 @@ ], | ||
{ | ||
"capIsNew": false, | ||
"newIsCap": true, | ||
"capIsNew": false, | ||
"properties": true | ||
@@ -251,7 +264,6 @@ } | ||
"no-misleading-character-class": "error", | ||
"no-prototype-builtins": "error", | ||
"no-useless-catch": "error", | ||
"no-mixed-operators": [ | ||
"error", | ||
{ | ||
"allowSamePrecedence": true, | ||
"groups": [ | ||
@@ -276,4 +288,3 @@ [ | ||
] | ||
], | ||
"allowSamePrecedence": true | ||
] | ||
} | ||
@@ -303,2 +314,3 @@ ], | ||
"no-proto": "error", | ||
"no-prototype-builtins": "error", | ||
"no-redeclare": [ | ||
@@ -348,4 +360,4 @@ "error", | ||
"allowShortCircuit": true, | ||
"allowTernary": true, | ||
"allowTaggedTemplates": true | ||
"allowTaggedTemplates": true, | ||
"allowTernary": true | ||
} | ||
@@ -356,5 +368,5 @@ ], | ||
{ | ||
"vars": "all", | ||
"args": "none", | ||
"ignoreRestSiblings": true | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
} | ||
@@ -365,4 +377,4 @@ ], | ||
{ | ||
"classes": false, | ||
"functions": false, | ||
"classes": false, | ||
"variables": false | ||
@@ -372,2 +384,3 @@ } | ||
"no-useless-call": "error", | ||
"no-useless-catch": "error", | ||
"no-useless-computed-key": "error", | ||
@@ -384,4 +397,4 @@ "no-useless-constructor": "error", | ||
{ | ||
"multiline": true, | ||
"consistent": true | ||
"consistent": true, | ||
"multiline": true | ||
} | ||
@@ -410,4 +423,4 @@ ], | ||
"overrides": { | ||
":": "before", | ||
"?": "before", | ||
":": "before", | ||
"|>": "before" | ||
@@ -421,4 +434,4 @@ } | ||
"blocks": "never", | ||
"switches": "never", | ||
"classes": "never" | ||
"classes": "never", | ||
"switches": "never" | ||
} | ||
@@ -433,2 +446,3 @@ ], | ||
"prefer-promise-reject-errors": "error", | ||
"promise/param-names": "error", | ||
"quote-props": [ | ||
@@ -442,4 +456,4 @@ "error", | ||
{ | ||
"avoidEscape": true, | ||
"allowTemplateLiterals": false | ||
"allowTemplateLiterals": false, | ||
"avoidEscape": true | ||
} | ||
@@ -458,4 +472,4 @@ ], | ||
{ | ||
"before": false, | ||
"after": true | ||
"after": true, | ||
"before": false | ||
} | ||
@@ -479,4 +493,4 @@ ], | ||
{ | ||
"words": true, | ||
"nonwords": false | ||
"nonwords": false, | ||
"words": true | ||
} | ||
@@ -488,23 +502,23 @@ ], | ||
{ | ||
"line": { | ||
"block": { | ||
"balanced": true, | ||
"exceptions": [ | ||
"*" | ||
], | ||
"markers": [ | ||
"*package", | ||
"!", | ||
"/", | ||
",", | ||
"=" | ||
":", | ||
"::", | ||
"flow-include" | ||
] | ||
}, | ||
"block": { | ||
"balanced": true, | ||
"line": { | ||
"markers": [ | ||
"*package", | ||
"!", | ||
"/", | ||
",", | ||
":", | ||
"::", | ||
"flow-include" | ||
], | ||
"exceptions": [ | ||
"*" | ||
"=" | ||
] | ||
@@ -514,2 +528,3 @@ } | ||
], | ||
"standard/no-callback-literal": "error", | ||
"symbol-description": "error", | ||
@@ -549,19 +564,4 @@ "template-curly-spacing": [ | ||
"never" | ||
], | ||
"import/export": "error", | ||
"import/first": "error", | ||
"import/no-absolute-path": [ | ||
"error", | ||
{ | ||
"esmodule": true, | ||
"commonjs": true, | ||
"amd": false | ||
} | ||
], | ||
"import/no-duplicates": "error", | ||
"import/no-named-default": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"promise/param-names": "error", | ||
"standard/no-callback-literal": "error" | ||
] | ||
} | ||
}; |
16
jsx.js
@@ -10,6 +10,6 @@ // JSX support for Standard.js | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
@@ -34,4 +34,4 @@ }, | ||
{ | ||
"props": "never", | ||
"children": "never" | ||
"children": "never", | ||
"props": "never" | ||
} | ||
@@ -49,2 +49,3 @@ ], | ||
{ | ||
"allowMultiline": true, | ||
"attributes": { | ||
@@ -55,4 +56,3 @@ "when": "never" | ||
"when": "never" | ||
}, | ||
"allowMultiline": true | ||
} | ||
} | ||
@@ -105,6 +105,6 @@ ], | ||
{ | ||
"closingSlash": "never", | ||
"afterOpening": "never", | ||
"beforeClosing": "never", | ||
"beforeSelfClosing": "always", | ||
"afterOpening": "never", | ||
"beforeClosing": "never" | ||
"closingSlash": "never" | ||
} | ||
@@ -111,0 +111,0 @@ ], |
@@ -9,6 +9,6 @@ // Flow language support for Standard.js (without style rules) | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"flowtype" | ||
], | ||
"parser": "babel-eslint", | ||
"rules": { | ||
@@ -15,0 +15,0 @@ "flowtype/define-flow-type": 1, |
@@ -9,12 +9,22 @@ // Core rules for Standard.js (without style rules) | ||
module.exports = { | ||
"env": { | ||
"es6": true | ||
}, | ||
"globals": { | ||
"clearInterval": "readonly", | ||
"clearTimeout": "readonly", | ||
"console": "readonly", | ||
"document": "readonly", | ||
"navigator": "readonly", | ||
"setInterval": "readonly", | ||
"setTimeout": "readonly", | ||
"window": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true | ||
}, | ||
"plugins": [ | ||
@@ -25,12 +35,2 @@ "import", | ||
], | ||
"globals": { | ||
"clearInterval": "readonly", | ||
"clearTimeout": "readonly", | ||
"console": "readonly", | ||
"setInterval": "readonly", | ||
"setTimeout": "readonly", | ||
"document": "readonly", | ||
"navigator": "readonly", | ||
"window": "readonly" | ||
}, | ||
"rules": { | ||
@@ -62,2 +62,15 @@ "accessor-pairs": "error", | ||
], | ||
"import/export": "error", | ||
"import/first": "error", | ||
"import/no-absolute-path": [ | ||
"error", | ||
{ | ||
"amd": false, | ||
"commonjs": true, | ||
"esmodule": true | ||
} | ||
], | ||
"import/no-duplicates": "error", | ||
"import/no-named-default": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"lines-between-class-members": [ | ||
@@ -73,4 +86,4 @@ "error", | ||
{ | ||
"capIsNew": false, | ||
"newIsCap": true, | ||
"capIsNew": false, | ||
"properties": true | ||
@@ -127,4 +140,2 @@ } | ||
"no-misleading-character-class": "error", | ||
"no-prototype-builtins": "error", | ||
"no-useless-catch": "error", | ||
"no-multi-str": "error", | ||
@@ -143,2 +154,3 @@ "no-negated-in-lhs": "error", | ||
"no-proto": "error", | ||
"no-prototype-builtins": "error", | ||
"no-redeclare": [ | ||
@@ -185,4 +197,4 @@ "error", | ||
"allowShortCircuit": true, | ||
"allowTernary": true, | ||
"allowTaggedTemplates": true | ||
"allowTaggedTemplates": true, | ||
"allowTernary": true | ||
} | ||
@@ -193,5 +205,5 @@ ], | ||
{ | ||
"vars": "all", | ||
"args": "none", | ||
"ignoreRestSiblings": true | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
} | ||
@@ -202,4 +214,4 @@ ], | ||
{ | ||
"classes": false, | ||
"functions": false, | ||
"classes": false, | ||
"variables": false | ||
@@ -209,2 +221,3 @@ } | ||
"no-useless-call": "error", | ||
"no-useless-catch": "error", | ||
"no-useless-computed-key": "error", | ||
@@ -230,2 +243,3 @@ "no-useless-constructor": "error", | ||
"prefer-promise-reject-errors": "error", | ||
"promise/param-names": "error", | ||
"spaced-comment": [ | ||
@@ -235,23 +249,23 @@ "error", | ||
{ | ||
"line": { | ||
"block": { | ||
"balanced": true, | ||
"exceptions": [ | ||
"*" | ||
], | ||
"markers": [ | ||
"*package", | ||
"!", | ||
"/", | ||
",", | ||
"=" | ||
":", | ||
"::", | ||
"flow-include" | ||
] | ||
}, | ||
"block": { | ||
"balanced": true, | ||
"line": { | ||
"markers": [ | ||
"*package", | ||
"!", | ||
"/", | ||
",", | ||
":", | ||
"::", | ||
"flow-include" | ||
], | ||
"exceptions": [ | ||
"*" | ||
"=" | ||
] | ||
@@ -261,2 +275,3 @@ } | ||
], | ||
"standard/no-callback-literal": "error", | ||
"symbol-description": "error", | ||
@@ -273,19 +288,4 @@ "use-isnan": "error", | ||
"never" | ||
], | ||
"import/export": "error", | ||
"import/first": "error", | ||
"import/no-absolute-path": [ | ||
"error", | ||
{ | ||
"esmodule": true, | ||
"commonjs": true, | ||
"amd": false | ||
} | ||
], | ||
"import/no-duplicates": "error", | ||
"import/no-named-default": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"promise/param-names": "error", | ||
"standard/no-callback-literal": "error" | ||
] | ||
} | ||
}; |
@@ -10,6 +10,6 @@ // JSX support for Standard.js (without style rules) | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
@@ -25,4 +25,4 @@ }, | ||
{ | ||
"props": "never", | ||
"children": "never" | ||
"children": "never", | ||
"props": "never" | ||
} | ||
@@ -29,0 +29,0 @@ ], |
@@ -9,8 +9,4 @@ // Typescript language support for Standard.js (without style rules) | ||
module.exports = { | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"overrides": [ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"files": [ | ||
@@ -20,43 +16,17 @@ "*.ts", | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"rules": { | ||
"no-undef": "off", | ||
"camelcase": "off", | ||
"no-array-constructor": "off", | ||
"no-empty-function": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "off", | ||
"require-await": "off", | ||
"@typescript-eslint/camelcase": [ | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"properties": "never" | ||
"default": "array-simple" | ||
} | ||
], | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"@typescript-eslint/camelcase": [ | ||
"error", | ||
{ | ||
"args": "none" | ||
"properties": "never" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"functions": false, | ||
"classes": false, | ||
"variables": false, | ||
"typedefs": false | ||
} | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"default": "array-simple" | ||
} | ||
], | ||
"@typescript-eslint/consistent-type-assertions": [ | ||
@@ -81,2 +51,4 @@ "error", | ||
], | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
@@ -97,2 +69,18 @@ "@typescript-eslint/no-extraneous-class": "error", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "none" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"classes": false, | ||
"functions": false, | ||
"typedefs": false, | ||
"variables": false | ||
} | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/no-var-requires": "error", | ||
@@ -103,2 +91,3 @@ "@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/require-array-sort-compare": "error", | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/restrict-plus-operands": "error", | ||
@@ -113,6 +102,17 @@ "@typescript-eslint/strict-boolean-expressions": "error", | ||
} | ||
] | ||
], | ||
"camelcase": "off", | ||
"no-array-constructor": "off", | ||
"no-empty-function": "off", | ||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "off", | ||
"require-await": "off" | ||
} | ||
} | ||
], | ||
"plugins": [ | ||
"@typescript-eslint" | ||
] | ||
}; |
{ | ||
"name": "eslint-config-standard-kit", | ||
"version": "0.14.4", | ||
"version": "0.14.5", | ||
"private": false, | ||
"description": "Standard.js linting rules - broken into modular pieces", | ||
"repository": "git://github.com/swansontec/eslint-config-standard-bits.git", | ||
"repository": "git://github.com/swansontec/eslint-config-standard-kit.git", | ||
"license": "MIT", | ||
@@ -35,7 +35,4 @@ "author": "William Swanson", | ||
}, | ||
"prettier": { | ||
"semi": false, | ||
"singleQuote": true | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@types/node": "^12.7.3", | ||
@@ -42,0 +39,0 @@ "@types/react": "^16.9.2", |
@@ -9,6 +9,6 @@ // Flow language support for Standard.js + Prettier | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"flowtype" | ||
], | ||
"parser": "babel-eslint", | ||
"rules": { | ||
@@ -15,0 +15,0 @@ "flowtype/define-flow-type": 1, |
@@ -9,12 +9,22 @@ // Core rules for Standard.js + Prettier | ||
module.exports = { | ||
"env": { | ||
"es6": true | ||
}, | ||
"globals": { | ||
"clearInterval": "readonly", | ||
"clearTimeout": "readonly", | ||
"console": "readonly", | ||
"document": "readonly", | ||
"navigator": "readonly", | ||
"setInterval": "readonly", | ||
"setTimeout": "readonly", | ||
"window": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"es6": true | ||
}, | ||
"plugins": [ | ||
@@ -26,12 +36,2 @@ "import", | ||
], | ||
"globals": { | ||
"clearInterval": "readonly", | ||
"clearTimeout": "readonly", | ||
"console": "readonly", | ||
"setInterval": "readonly", | ||
"setTimeout": "readonly", | ||
"document": "readonly", | ||
"navigator": "readonly", | ||
"window": "readonly" | ||
}, | ||
"rules": { | ||
@@ -63,2 +63,15 @@ "accessor-pairs": "error", | ||
], | ||
"import/export": "error", | ||
"import/first": "error", | ||
"import/no-absolute-path": [ | ||
"error", | ||
{ | ||
"amd": false, | ||
"commonjs": true, | ||
"esmodule": true | ||
} | ||
], | ||
"import/no-duplicates": "error", | ||
"import/no-named-default": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"lines-between-class-members": [ | ||
@@ -74,4 +87,4 @@ "error", | ||
{ | ||
"capIsNew": false, | ||
"newIsCap": true, | ||
"capIsNew": false, | ||
"properties": true | ||
@@ -128,4 +141,2 @@ } | ||
"no-misleading-character-class": "error", | ||
"no-prototype-builtins": "error", | ||
"no-useless-catch": "error", | ||
"no-multi-str": "error", | ||
@@ -144,2 +155,3 @@ "no-negated-in-lhs": "error", | ||
"no-proto": "error", | ||
"no-prototype-builtins": "error", | ||
"no-redeclare": [ | ||
@@ -186,4 +198,4 @@ "error", | ||
"allowShortCircuit": true, | ||
"allowTernary": true, | ||
"allowTaggedTemplates": true | ||
"allowTaggedTemplates": true, | ||
"allowTernary": true | ||
} | ||
@@ -194,5 +206,5 @@ ], | ||
{ | ||
"vars": "all", | ||
"args": "none", | ||
"ignoreRestSiblings": true | ||
"ignoreRestSiblings": true, | ||
"vars": "all" | ||
} | ||
@@ -203,4 +215,4 @@ ], | ||
{ | ||
"classes": false, | ||
"functions": false, | ||
"classes": false, | ||
"variables": false | ||
@@ -210,2 +222,3 @@ } | ||
"no-useless-call": "error", | ||
"no-useless-catch": "error", | ||
"no-useless-computed-key": "error", | ||
@@ -231,2 +244,10 @@ "no-useless-constructor": "error", | ||
"prefer-promise-reject-errors": "error", | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} | ||
], | ||
"promise/param-names": "error", | ||
"spaced-comment": [ | ||
@@ -236,23 +257,23 @@ "error", | ||
{ | ||
"line": { | ||
"block": { | ||
"balanced": true, | ||
"exceptions": [ | ||
"*" | ||
], | ||
"markers": [ | ||
"*package", | ||
"!", | ||
"/", | ||
",", | ||
"=" | ||
":", | ||
"::", | ||
"flow-include" | ||
] | ||
}, | ||
"block": { | ||
"balanced": true, | ||
"line": { | ||
"markers": [ | ||
"*package", | ||
"!", | ||
"/", | ||
",", | ||
":", | ||
"::", | ||
"flow-include" | ||
], | ||
"exceptions": [ | ||
"*" | ||
"=" | ||
] | ||
@@ -262,2 +283,3 @@ } | ||
], | ||
"standard/no-callback-literal": "error", | ||
"symbol-description": "error", | ||
@@ -274,26 +296,4 @@ "use-isnan": "error", | ||
"never" | ||
], | ||
"import/export": "error", | ||
"import/first": "error", | ||
"import/no-absolute-path": [ | ||
"error", | ||
{ | ||
"esmodule": true, | ||
"commonjs": true, | ||
"amd": false | ||
} | ||
], | ||
"import/no-duplicates": "error", | ||
"import/no-named-default": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"promise/param-names": "error", | ||
"standard/no-callback-literal": "error", | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} | ||
] | ||
} | ||
}; |
@@ -10,6 +10,6 @@ // JSX support for Standard.js + Prettier | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2020, | ||
"sourceType": "module" | ||
@@ -25,4 +25,4 @@ }, | ||
{ | ||
"props": "never", | ||
"children": "never" | ||
"children": "never", | ||
"props": "never" | ||
} | ||
@@ -29,0 +29,0 @@ ], |
@@ -9,8 +9,4 @@ // Typescript language support for Standard.js + Prettier | ||
module.exports = { | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"overrides": [ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"files": [ | ||
@@ -20,43 +16,17 @@ "*.ts", | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"rules": { | ||
"no-undef": "off", | ||
"camelcase": "off", | ||
"no-array-constructor": "off", | ||
"no-empty-function": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "off", | ||
"require-await": "off", | ||
"@typescript-eslint/camelcase": [ | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"properties": "never" | ||
"default": "array-simple" | ||
} | ||
], | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"@typescript-eslint/camelcase": [ | ||
"error", | ||
{ | ||
"args": "none" | ||
"properties": "never" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"functions": false, | ||
"classes": false, | ||
"variables": false, | ||
"typedefs": false | ||
} | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"default": "array-simple" | ||
} | ||
], | ||
"@typescript-eslint/consistent-type-assertions": [ | ||
@@ -81,2 +51,4 @@ "error", | ||
], | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
@@ -97,2 +69,18 @@ "@typescript-eslint/no-extraneous-class": "error", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "none" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"classes": false, | ||
"functions": false, | ||
"typedefs": false, | ||
"variables": false | ||
} | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/no-var-requires": "error", | ||
@@ -103,2 +91,3 @@ "@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/require-array-sort-compare": "error", | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/restrict-plus-operands": "error", | ||
@@ -113,6 +102,17 @@ "@typescript-eslint/strict-boolean-expressions": "error", | ||
} | ||
] | ||
], | ||
"camelcase": "off", | ||
"no-array-constructor": "off", | ||
"no-empty-function": "off", | ||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "off", | ||
"require-await": "off" | ||
} | ||
} | ||
], | ||
"plugins": [ | ||
"@typescript-eslint" | ||
] | ||
}; |
@@ -75,1 +75,9 @@ # eslint-config-standard-kit | ||
Flow support uses the recommended settings from [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype). | ||
## Contributing | ||
Pull requests are welcome! This library uses its own rules for linting & formatting, so please be sure the pre-commit hooks pass. | ||
The unit tests use a snapshot system to verify that our output doesn't change. If you need to update the snapshots, just run `UPDATE=1 yarn test` to re-generate those. | ||
To test the web interface, just use `yarn prepare` to compile the code, then open / refresh `public/index.html`. |
@@ -9,8 +9,4 @@ // Typescript language support for Standard.js | ||
module.exports = { | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"overrides": [ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"files": [ | ||
@@ -20,70 +16,17 @@ "*.ts", | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"rules": { | ||
"no-undef": "off", | ||
"camelcase": "off", | ||
"indent": "off", | ||
"no-array-constructor": "off", | ||
"no-empty-function": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "off", | ||
"require-await": "off", | ||
"@typescript-eslint/camelcase": [ | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"properties": "never" | ||
"default": "array-simple" | ||
} | ||
], | ||
"@typescript-eslint/indent": [ | ||
"@typescript-eslint/camelcase": [ | ||
"error", | ||
2, | ||
{ | ||
"SwitchCase": 1, | ||
"VariableDeclarator": 1, | ||
"outerIIFEBody": 1, | ||
"MemberExpression": 1, | ||
"FunctionDeclaration": { | ||
"parameters": 1, | ||
"body": 1 | ||
}, | ||
"FunctionExpression": { | ||
"parameters": 1, | ||
"body": 1 | ||
}, | ||
"CallExpression": { | ||
"arguments": 1 | ||
}, | ||
"ArrayExpression": 1, | ||
"ObjectExpression": 1, | ||
"ImportDeclaration": 1, | ||
"flatTernaryExpressions": false, | ||
"ignoreComments": false | ||
"properties": "never" | ||
} | ||
], | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "none" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"functions": false, | ||
"classes": false, | ||
"variables": false, | ||
"typedefs": false | ||
} | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/adjacent-overload-signatures": "error", | ||
"@typescript-eslint/array-type": [ | ||
"error", | ||
{ | ||
"default": "array-simple" | ||
} | ||
], | ||
"@typescript-eslint/consistent-type-assertions": [ | ||
@@ -108,2 +51,28 @@ "error", | ||
], | ||
"@typescript-eslint/indent": [ | ||
"error", | ||
2, | ||
{ | ||
"ArrayExpression": 1, | ||
"CallExpression": { | ||
"arguments": 1 | ||
}, | ||
"FunctionDeclaration": { | ||
"body": 1, | ||
"parameters": 1 | ||
}, | ||
"FunctionExpression": { | ||
"body": 1, | ||
"parameters": 1 | ||
}, | ||
"ImportDeclaration": 1, | ||
"MemberExpression": 1, | ||
"ObjectExpression": 1, | ||
"SwitchCase": 1, | ||
"VariableDeclarator": 1, | ||
"flatTernaryExpressions": false, | ||
"ignoreComments": false, | ||
"outerIIFEBody": 1 | ||
} | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
@@ -121,2 +90,4 @@ "error", | ||
], | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"@typescript-eslint/no-empty-function": "error", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
@@ -137,2 +108,18 @@ "@typescript-eslint/no-extraneous-class": "error", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"args": "none" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": [ | ||
"error", | ||
{ | ||
"classes": false, | ||
"functions": false, | ||
"typedefs": false, | ||
"variables": false | ||
} | ||
], | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
"@typescript-eslint/no-var-requires": "error", | ||
@@ -143,2 +130,3 @@ "@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/require-array-sort-compare": "error", | ||
"@typescript-eslint/require-await": "error", | ||
"@typescript-eslint/restrict-plus-operands": "error", | ||
@@ -154,6 +142,18 @@ "@typescript-eslint/strict-boolean-expressions": "error", | ||
], | ||
"@typescript-eslint/type-annotation-spacing": "error" | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"camelcase": "off", | ||
"indent": "off", | ||
"no-array-constructor": "off", | ||
"no-empty-function": "off", | ||
"no-undef": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "off", | ||
"require-await": "off" | ||
} | ||
} | ||
], | ||
"plugins": [ | ||
"@typescript-eslint" | ||
] | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
51273
20
1910
83
29