eslint-config-totominc v0.0.6
eslint-config-totominc
Some ESLint configs that I use a lot.
Configurations
This eslint-config
ships with 4 configurations:
totominc
: default configuration for pure JS projects, extends airbnb eslint-config and ships with an already configured prettier config.totominc/typescript
: recommended configuration for pure TS projects, extends airbnb eslint-config for TypeScript. Set by default the parser to@typescript-eslint/parser
with recentecmaVersion
.totominc/vue
: recommended configuration for Vue.js projects initialized by the official Vue CLI tool. Extends airbnb eslint-config with specific rules for Vue projets. Also comes with prettier.totominc/vue-typescript
: recommended configuration for Vue.js with TypeScript projects generated by the official Vue CLI tool. Extends recommended Vue rules, recommended TypeScript rules, airbnb eslint config and prettier support.
Installation
Local/per-project installation
Install all peer-dependencies from this package, this includes modules that are required by the
eslint-config-totominc
:npx install-peerdeps --dev eslint-config-totominc@latest --yarn
Check your
package.json
for a list of dev-dependencies.Create a
.eslintrc.js
file configuration for ESLint in the root of your project. Then you can extend one of the provided configurations fromeslint-config-totominc
:module.exports = { extends: ['totominc'], };
Note: you may want to configure your IDE to automatically fix on save. For VSCode, you can use the
vscode-eslint
extension and configure
your settings.json
like this:
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Global installation
Install all peer-dependencies from this package, this includes modules that are required by the
eslint-config-totominc
:npx install-peerdeps --global eslint-config-totominc@latest --yarn
Create a global
.eslintrc.js
file configuration for ESLint in your home folder (e.g.~/.eslintrc.js
). Then you can extend one of the provided configurations fromeslint-config-totominc
:module.exports = { extends: ['totominc'], };