4.1.1 • Published 3 years ago
@anexia/eslint-config-aqua v4.1.1
@anexia/eslint-config-aqua
ESLint shareable config
Install
npm i -D @anexia/eslint-config-aqua
Usage
Add the ESLint config to your package.json
:
{
"name": "my-project",
...
"eslintConfig": {
"extends": "@anexia/eslint-config-aqua"
}
}
Or eslintrc.json
:
{
"extends": "@anexia/eslint-config-aqua"
}
Targets
If you are developing with Javascript in the browser consider adding:
{
"extends": "@anexia/eslint-config-aqua"
"env": {
"browser": true
}
}
or use the platform specific configs for Node.js:
{
"extends": "@anexia/eslint-config-aqua/node"
}
or Svelte:
{
"extends": "@anexia/eslint-config-aqua/svelte"
}
or React:
{
"extends": "@anexia/eslint-config-aqua/react"
}
or any other JSX:
{
"extends": "@anexia/eslint-config-aqua/jsx"
}
or Vue.js:
{
"extends": "@anexia/eslint-config-aqua/vue"
}
Using the Vue extended config will require you to additionally install eslint-plugin-vue
and babel-eslint
npm i -D babel-eslint eslint-plugin-vue
Prettier usage
If you want to apply your own .prettierrc
rules with support for disabling the correct rules, just add /prettier
before the target name.
Also make sure you install prettier
and eslint-config-prettier
for this to work.
npm i -D prettier eslint-config-prettier
{
"extends": "@anexia/eslint-config-aqua/prettier"
}
{
"extends": "@anexia/eslint-config-aqua/prettier/node"
}
or Svelte:
{
"extends": "@anexia/eslint-config-aqua/prettier/svelte"
}
or React:
{
"extends": "@anexia/eslint-config-aqua/prettier/react"
}
or any other JSX:
{
"extends": "@anexia/eslint-config-aqua/prettier/jsx"
}
or Vue.js:
{
"extends": "@anexia/eslint-config-aqua/prettier/vue"
}