Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
eslint-config-problems
Advanced tools
An eslint config that catches problems in your code, without checking style. For use with prettier.
eslint-config-problems
is an ESLint config that doesn't regulate your code style. It only catches actual problems with your code.
It's designed for use with Prettier, the opinionated code formatter; but you could also use this as a solid base config to add stylistic rules on top of.
Rules were chosen based on the following criteria:
eval
with
new Number(13)
if (someCondition) return someValue;
else {
// Do something else
}
The else
block is unneeded, since the if
block contains a return
statement. eslint-config-problems
will point this out to you (or auto-fix with the --fix
option).eslint-config-problems
also sets ecmaVersion: 2020
in the parserOptions
, so that ESLint can parse modern code (including BigInt
) with no additional setup.
If you disagree; feel free to open an issue. I'm open to changing rules if you have a good reason.
If I missed a rule that prevents an actual problem or is otherwise in keeping with the general guidelines above, please open an issue as well; I just might add it.
eslint-config-problems
doesn't set any environments by default, other than the es6
environment. So you'll have to manually set your environment in your ESLint config. Here's a list of environments.
If you're using ES Modules, you will need to set sourceType: module
in the parserOptions
, like this:
parserOptions:
sourceType: module
npm install -D eslint eslint-config-problems
In your eslintrc.yaml:
extends: 'problems'
env:
# Set your environments here; for example:
node: true
eslint-plugin-prettier
npm install -D eslint prettier eslint-config-problems eslint-plugin-prettier
In your eslintrc.yaml:
extends: 'problems'
env:
# Set your environments here; for example:
node: true
plugins:
- prettier
rules:
- prettier/prettier: error
FAQs
An eslint config that catches problems in your code, without checking style. For use with prettier.
The npm package eslint-config-problems receives a total of 7,011 weekly downloads. As such, eslint-config-problems popularity was classified as popular.
We found that eslint-config-problems 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.