2.1.2 • Published 8 months ago

@etchteam/eslint-config v2.1.2

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

@etchteam/eslint

The eslint config that we use at Etch

Install

npm i -D eslint prettier @etchteam/eslint-config

Usage

echo "module.exports = { extends: ['@etchteam'] };" > .eslintrc.cjs

With lint-staged

New project

Run the following:

npm i -D husky lint-staged

echo "module.exports = { '*.{ts,tsx,js,jsx,yml,yaml,json}': 'eslint --fix' };" > lint-staged.config.cjs

npx husky init

echo "npx --no-install -- lint-staged" > .husky/pre-commit

Existing project with husky and lint staged

Add the following to your lint-staged config:

'*.{ts,tsx,js,jsx,yml,yaml,json}': 'eslint --fix'

Usage with VSCode

New project with no VSCode config

Run the following:

mkdir .vscode

echo "{ \"editor.formatOnSave\": false, \"editor.codeActionsOnSave\": { \"source.fixAll.eslint\": \"explicit\" } }" > .vscode/settings.json

# The VSCode prettier extension doesn't read the eslint config, so specific
# prettier overrides need to go in a prettier config for format on save
echo "module.exports = { singleQuote: true };" > prettier.config.cjs

Exisiting project with VSCode config

Add the following to .vscode/settings.json:

"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
  "source.fixAll.eslint": "explicit"
}

Run the following:

# The VSCode prettier extension doesn't read the eslint config, so specific
# prettier overrides need to go in a prettier config for format on save
echo "module.exports = { singleQuote: true };" > prettier.config.cjs
2.0.29

8 months ago

2.1.2

8 months ago

2.1.1

8 months ago

2.1.0

8 months ago

2.0.28

8 months ago

2.0.27

8 months ago

2.0.26

8 months ago

2.0.25

8 months ago

2.0.3

11 months ago

1.11.16

12 months ago

2.0.2

11 months ago

1.11.17

12 months ago

2.0.5

10 months ago

1.11.14

12 months ago

2.0.4

10 months ago

1.11.15

12 months ago

1.11.12

1 year ago

1.11.13

12 months ago

1.11.10

1 year ago

1.11.11

1 year ago

2.0.1

11 months ago

1.11.18

12 months ago

2.0.0

11 months ago

1.11.19

12 months ago

1.11.4

1 year ago

1.11.3

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.11.8

1 year ago

1.11.7

1 year ago

1.11.6

1 year ago

1.11.5

1 year ago

1.11.9

1 year ago

2.0.15

9 months ago

2.0.16

9 months ago

2.0.13

9 months ago

2.0.14

9 months ago

2.0.12

9 months ago

1.11.20

11 months ago

2.0.19

9 months ago

2.0.17

9 months ago

2.0.18

9 months ago

2.0.24

8 months ago

2.0.22

8 months ago

2.0.23

8 months ago

2.0.20

9 months ago

2.0.21

9 months ago

1.11.0

1 year ago

1.10.0

1 year ago

1.8.0

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

0.0.1

2 years ago