The ESLint plugin used within Y Software AB.
In your project's .eslintrc.js
module.exports = {
extends: [
'plugin:y/recommended-node'
],
rules: {
'override-some-rule': error
}
}
Optionally, you can run node_modules/eslint-plugin-y/npm-install-peer-dependencies
in order to install the required peer dependencies.
If you want to use an addon, it's as easy as doing this in .eslintrc.js
:
module.exports = {
extends: [
'plugin:y/recommended-node',
'plugin:y/jest'
],
rules: {
'override-some-rule': error
}
}
and running npm install --dev eslint-plugin-jest
.
Common bundles are provided as following:
plugin:y/recommended-node
plugin:y/recommended-node-typescript
plugin:y/recommended-browser
plugin:y/recommended-browser-typescript
These addons require you to install the plugin manually:
@typescript-eslint/eslint-plugin
: plugin:y/typescript
eslint-plugin-jasmine
: plugin:y/jasmine
eslint-plugin-jest
: plugin:y/jest
eslint-plugin-protractor
: plugin:y/protractor
eslint-plugin-vue
: plugin:y/vue
"I (don't) like/want ..." is no argument in this codebase. Instead, we follow a few guiding principles that have concrete consequences on daily work.
In March 2021, repositories got renamed
eslint-config-y
-> eslint-plugin-y
(this one)eslint-plugin-y
-> eslint-plugin-y-deprecated
(this one)The reason for this change was because ESlint can now store and reference configs inside a plugin, and because npm@7 has a backward incompatible change to auto-install peer dependencies, while the previous setup only works on the assumption that peer dependencies are not automatically installed.
Github's behaviour is to redirect when renaming, so currently both ysoftwareab/eslint-config-y
and ysoftwareab/eslint-plugin-y
are pointing to the same content of this repository.
So for backwards compatibility,
the v0.0.x and v0.1.x tags are from the original eslint-plugin-y
,
now called eslint-plugin-y-deprecated
,
while the v0.0.x and v0.1.x tags of the original eslint-config-y
have been namespaced with config/
.