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.
@1password/eslint-config
Advanced tools
1Password’s shared ESLint configs, one of which is a base config that includes a specific set of rules, the other of which is the base config plus a set of rules that are specific to React.
Navigate to the root of your project. Note that the root is wherever your manifest (or package.json
) file lives, and that can be a subdirectory or the root of your repo.
Use your project’s package manager to install @1password/eslint-config and ESLint:
pnpm add --save-dev @1password/eslint-config eslint
npm install --save-dev @1password/eslint-config eslint
yarn add --dev @1password/eslint-config eslint
.eslintrc.js
file, if one does not yet exist:touch .eslintrc.js
.eslintrc.js
file:// Base Config
module.exports = {
extends: "@1password/eslint-config",
// other settings
};
// Base Config plus React-specific Rules
module.exports = {
extends: "@1password/eslint-config/react",
// other settings
};
// Base Config
module.exports = {
extends: [
"@1password/eslint-config",
"@1password/eslint-config/disabled-formatting-rules",
],
// other settings
};
// Base Config plus React-specific Rules
module.exports = {
extends: [
"@1password/eslint-config/react",
"@1password/eslint-config/disabled-formatting-rules",
],
// other settings
};
If the custom config can’t disable all of the formatting rules in your project, see if you’re using an ESLint plugin that isn’t included in @1password/eslint-config, but is included in this list:
https://github.com/prettier/eslint-config-prettier#plugins
If you are, you’ll be able to turn off that plugin’s formatting rules through eslint-config-prettier instead of the custom config.
If you want to integrate ESLint with your IDE or text editor so that you can have your JavaScript and TypeScript code linted as you code, visit
https://eslint.org/docs/latest/use/integrations#editors
to see which integrations are currently supported.
Discussions around this package have caused us to identify a sort of philosophy to guide how we manage rules. The current state of the package may not meet these ideals completely.
Changes must consider that this package is intended to be used in every TypeScript project at 1Password. Thus, changes shouldn't focus on the needs of one particular project, and they should be kept as uncontroversial as possible, while considering that hundreds of people will rarely fully agree about anything.
If a rules package has broad acceptance within the JS/TS community, its recommended ruleset should be extended (e.g. eslint:recommended
), with minimal overrides as needed. See ./.eslintrc.js
for an example.
If a rules package has a recommended set containing a good portion of controversial/preferential rules, that set should not be extended. Enable individual rules instead of enabling an entire set of rules and then disabling controversial rules. See ./sonar.js
for an example.
FAQs
1Password’s shared ESLint configuration.
The npm package @1password/eslint-config receives a total of 7,063 weekly downloads. As such, @1password/eslint-config popularity was classified as popular.
We found that @1password/eslint-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.