Monorepo for all my eslint & prettier stuff, in a easily sharable form.
npm install --dev @rixo/eslint-configYou can have your .eslintrc and .prettierrc files can be created automatically for you by running the provided script:
npm run rixo-eslint-initIf these files already exists in your project, then they won't be touched.
Not too sure about Windows support currently, but if the script doesn't work for you, you can refer to the variants section to create the files yourself.
Just use eslint, & prettier...
npx eslint src
npx prettier 'src/**/*'
npx prettier --write 'src/**/*'You can customize your rules in .eslintrc too.
All variants include eslint-plugin-disable so you can always disable a plugin that was added automatically, if the combination does not work well for you.
eslint-plugin-disable supports disabling in .eslintrc or on a per-file basis, with a comment:
/* eslint-plugin-disable import, prettier */Note: the example bellow use the shortcut form of extends, but feel free to use an array if you want to extend from other config.
Example:
# .eslintrc
extends:
- '@rixo'
- 'plugin:whatever'# .eslintrc
extends: '@rixo'With added support for Svelte syntax (in both eslint & prettier).
# .eslintrc
extends: '@rixo/svelte'Specific rules for development of Atom packages.
# .eslintrc
extends: '@rixo/atom'