
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
eslint-config-rasenplanscher
Advanced tools
Being a manifest of how eslint should be configured, according to the author's considered opinion. PRs welcome!
⚠ Deprecation Notice ⚠ |
---|
Due to a shift in focus and plans for additional features out of scope for a package like this, there is now a successor, in spirit and in code: That package has the exact same feature set at the time of writing but will be maintained and extended.
Work on Please make sure to switch. |
This package provides a reasoned reactive shareable ESLint configuration in several variations.
The settings in this configuration are not generally built on gut feelings but on reasoning regarding how code formatting can improve productivity. All of that is documented in the project itself, so if you want to know why a rule is configured as it is, look at the markdown files you can find in the Github repository.
If you disagree with something rationally, please open an issue to help me correct my thinking. If you disagree based on a gut feeling, please keep it to yourself until you either understand the truth found here or you can make a rational argument.
Also, if you'd like a setting that's missing here, just open a PR and it shall be included if the reasoning is up to snuff.
Note |
---|
Due to time constraints, this goal has been de-prioritized. If you are unclear why a certain rule is configured the way it is, please open an issue. PRs are also still welcome, of course. |
This configuration determines whether your project uses the eslint plugins it has rules for and only activates those rules for the available plugins. That way, you can set up your project and just add the plugins you're interested in. The configuration will handle the rest.
And yes, on first publish, there's only a few rules. Live with it or get active!
That's eslint-speak for an npm package that you can add to your project's dev dependencies and include in your estlintrc's extends
configuration.
I hope that this will be interesting to others than myself. Therefore, I want to enable others to use this to the degree they are comfortable with. What that means is that you can use all the rules in here, just the most important ones, or something in between that will cover a lot but leave you in peace with what goes into the area of nit-picking.
First, install it (as well as the plugins you want):
npm install --save-dev eslint-config-rasenplanscher eslint@^8.7.0 @typescript-eslint/eslint-plugin@^5.10.0 @typescript-eslint/parser@^5.10.0 eslint-plugin-compat@^4.0.2 eslint-plugin-import@^2.25.4 eslint-plugin-node@^11.1.0 eslint-plugin-react@^7.28.0 eslint-plugin-simple-import-sort@^7.0.0 eslint-plugin-unused-imports@^2.0.0
Then either add this to your package.json
:
"eslintConfig": {
"root": true,
"extends": "rasenplanscher",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
}
},
…or create a file named .eslintrc.json
with following contents in the root folder of your project:
{
"root": true,
"extends": "rasenplanscher",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
}
}
When using @typescript-eslint/eslint-plugin
(you should 😉),
you need to also add @typescript-eslint/parser
to your dependencies and set the appropriate typescript configuration:
{
"root": true,
"extends": "rasenplanscher",
"parserOptions": {
"ecmaVersion": 2021,
"project": "./tsconfig.json",
"sourceType": "module"
}
}
If your project is a multi-package monorepo, see @typescript-eslint
's docs on configuring a monorepo.
If you want to relax or strengthen your setup, you can choose from these setups (from smallest to largest):
rasenplanscher/eslintrc.important
:
The really important rules that will actually prevent errors – Never go without these!rasenplanscher
:
Adds more rules that will help avoid confusion. Most projects will profit from these.rasenplanscher/eslintrc.all
:
Adds more rules. These will help legibility, and therefore maintainability. Since these will be regarded as just “personal preference” by some people, they are opt-in.rasenplanscher/eslintrc.all.dangerzone
:
Modifies a few rules to enable some advanced patterns that really should be used only by those who really know what they do. If you want to use this, first familiarize yourself with the Pro Tips of dangerzone
-enabled rules. If you don't know how, this is not for you yet.⚠ dangerzone
If you want more control over what's going on, especially if you want to go into the danger zone step by step (which is definitely recommended), your best friend is eslintrc.make.js
which exposes the API that the ready-made extendable files use themselves:
// eslintrc.js in your project
module.exports = require('eslint-config-rasenplanscher/eslintrc.make')({
priorities: [ 'IMPORTANT', 'HELPFUL', 'TASTE' ],
dangerzone: [ 'curly' ],
overrides: {
root: true,
parserOptions: {
ecmaVersion: 2021,
},
},
})
eslint-plugin-react
browser
environment for eslint-plugin-react
, eslint-plugin-react-hooks
, and eslint-plugin-vue
node
environment for eslint-plugin-node
eslint-plugin-compat
TASTE
level ruleseslint-plugin-vue
eslint-plugin-simple-import-sort
peerDependencies
parserOptions.project
for @typescript-eslint/eslint-plugin
default
, important
, all
, all+dangerzone
FAQs
Being a manifest of how eslint should be configured, according to the author's considered opinion. PRs welcome!
The npm package eslint-config-rasenplanscher receives a total of 6 weekly downloads. As such, eslint-config-rasenplanscher popularity was classified as not popular.
We found that eslint-config-rasenplanscher demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.