eslint-cook
v0.0.9
Published
[![NPM badge](https://img.shields.io/npm/v/eslint-cook.svg)](https://www.npmjs.com/package/eslint-cook)
Downloads
6
Readme
eslint-cook
Usage: eslint-cook [options]
Generate eslint configuration file
Options:
-m, --modules [names...] eslint module names.
possible values: typescript, ts, prettier, react,
reactjs, import, imports, effector, effectorjs,
babel, babeljs, a11y, next, nextjs,
styled-components, sc, unicorn
-r, --rewrite rewrite existing eslint config file (default:
false)
-o, --output <string> output path (default: "./.eslintrc")
-v, --version output the current version
-h, --help display help for command
How to use
npx eslint-cook -m typescript react -o ./eslintrc
Possible module names typescript, ts, prettier, react, reactjs, import, imports, effector, effectorjs, babel, babeljs, a11y, next, nextjs, styled-components, sc, unicorn
modules
typescript
dependencies: @typescript-eslint/eslint-plugin@^4.28.3, @typescript-eslint/parser@^4.28.3
definitions:ts
, typescript
conflicts:babel
configuration:
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-empty-interface": "off",
"@typescript-eslint/no-empty-interface": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}
prettier
dependencies: prettier@^2.4.1, eslint-plugin-prettier@^4.0.0, eslint-config-prettier@^8.3.0
definitions:prettier
configuration:
{
"extends": [
"plugin:prettier/recommended"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": [
"error",
{
"endOfLine": "auto",
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "all",
"semi": true
}
]
}
}
react
dependencies: eslint-plugin-react@^7.25.1, eslint-plugin-react-hooks@^4.2.0
definitions:react
, reactjs
configuration:
{
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"plugins": [
"react",
"react-hooks"
],
"rules": {
"react/display-name": "off",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error"
}
}
import
dependencies: eslint-plugin-import@^2.25.1, eslint-import-resolver-alias@^1.1.2
definitions:import
, imports
configuration:
{
"settings": {
"import/resolver": {
"alias": {
"extensions": [
".js",
".jsx",
".json"
]
}
}
},
"extends": [
"plugin:import/errors",
"plugin:import/warnings"
],
"plugins": [
"import"
],
"rules": {
"import/order": [
"error",
{
"groups": [
[
"external"
],
[
"builtin"
],
[
"internal"
],
[
"parent"
],
[
"sibling"
],
[
"object"
],
[
"index"
]
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
}
relations:
typescript
{
"settings": {
"import/resolver": {
"alias": {
"extensions": [
".ts",
".tsx",
".js",
".jsx",
".json"
]
}
}
},
"extends": [
"plugin:import/typescript"
],
"plugins": [],
"rules": {}
}
effector
dependencies: eslint-plugin-effector@^0.2.0
definitions:effector
, effectorjs
configuration:
{
"extends": [
"plugin:effector/recommended"
],
"plugins": [
"effector"
],
"rules": {}
}
babel
dependencies: @babel/eslint-parser@^7.15.7
definitions:babel
, babeljs
conflicts:typescript
configuration:
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false,
"ecmaFeatures": {
"globalReturn": false
}
},
"extends": [],
"plugins": [],
"rules": {}
}
a11y
dependencies: eslint-plugin-jsx-a11y@^6.4.1
definitions:a11y
configuration:
{
"extends": [
"plugin:jsx-a11y/recommended"
],
"plugins": [
"jsx-a11y"
],
"rules": {}
}
next
dependencies: eslint-config-next@^11.1.2
definitions:next
, nextjs
configuration:
{
"extends": [
"next/core-web-vitals"
],
"plugins": [],
"rules": {}
}
styled-components
dependencies: eslint-plugin-better-styled-components@^1.1.2
definitions:sc
, styled-components
configuration:
{
"extends": [],
"plugins": [
"better-styled-components"
],
"rules": {
"better-styled-components/sort-declarations-alphabetically": 2
}
}
unicorn
dependencies: eslint-plugin-unicorn@^36.0.0
definitions:unicorn
configuration:
{
"extends": [
"plugin:unicorn/recommended"
],
"plugins": [
"unicorn"
],
"rules": {}
}