
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
eslint-config-leaflink
Advanced tools
Opinionated ESLint configuration for LeafLink's frontend repositories.
Opinionated ESLint configuration that extends airbnb to not conflict with prettier.
.ts
and .tsx
files) and TypeScript within .vue
sfc files.Install by running:
npx install-peerdeps --dev eslint-config-leaflink
Then extend from the leaflink
config in your .eslintrc.js:
module.exports = {
extends: ['leaflink'],
rules: {
// your overrides here
},
};
Prettier is automatically run through eslint with LeafLink's default configuration. You can optionally add a .prettierrc.js
configuration file in the root of your project and it will take precedence over the built-in config within eslint-config-leaflink.
If you'd like to extend our prettier config and only override a couple of properties, you can do the following:
prettierrc.js
const prettierConfig = require('eslint-config-leaflink/prettier');
module.exports = Object.assign(prettierConfig, {
// your overrides here
});
In your .stylelintrc
file, you can extend from the shared LeafLink stylelint config.
{
"extends": ["eslint-config-leaflink/stylelint"]
}
Or you can do so in your package.json
:
{
"stylelint": {
"extends": ["eslint-config-leaflink/stylelint"],
}
}
Create a commitlint.config.js
in your project so you can extend from the shared LeafLink commitlint config.
const commitlintConfig = require('eslint-config-leaflink/commitlint');
module.exports = Object.assign(commitlintConfig, {
// your overrides here
rules: {
'scope-case': [1],
},
})
https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/149
When building dynamic classes, the auto sorting of tailwind classes can break things so beware:
To avoid this happening you can re-wrap the dynamic class expression like so:
class="`p-0 ${`tw-border-${accentColor}`}`"
npm uninstall \
eslint \
@vue/eslint-config-prettier \
@vue/eslint-config-typescript \
eslint-plugin-simple-import-sort \
eslint-plugin-vue vue-eslint-parser \
eslint-plugin-testing-library \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint-plugin-cypress \
stylelint \
stylelint-config-prettier \
stylelint-config-standard \
stylelint-config-standard-scss \
stylelint-config-standard-vue \
stylelint-order \
postcss-html \
@commitlint/cli \
@commitlint/config-conventional
rm .stylelint.config.js .stylelintrc
npm uninstall prettier
rm .prettierrc.cjs .prettierrc.js .prettierrc
eslint-config-leaflink
.
npx install-peerdeps --dev eslint-config-leaflink
.eslintignore
file if our default list of ignorePatterns
is adequate. (Note: If you think there's a good general addition to this list, please open a PR).ignorePatterns: ['dist', '!.github'],
module.exports = {
- extends: [
- 'plugin:vue/vue3-recommended',
- 'eslint:recommended',
- '@vue/eslint-config-typescript',
- '@vue/eslint-config-prettier',
- 'prettier',
- '@vue/prettier',
- '@vue/typescript',
- 'plugin:testing-library/vue',
- ],
- env: {
- es2021: true,
- browser: true,
- es6: true,
- node: true,
- jest: true,
- },
- plugins: [
- '@typescript-eslint',
- 'prettier',
- 'simple-import-sort',
- ],
- parser: 'vue-eslint-parser',
- parserOptions: {
- ecmaVersion: 2018,
- sourceType: 'module',
- parser: '@typescript-eslint/parser',
- },
+ extends: ['leaflink'],
+ // overrides...
}
package.json
.
- "commitlint": {
- "extends": [
- "@commitlint/config-conventional"
- ],
- "rules": {
- "scope-case": [
- 0
- ],
- "body-max-line-length": [
- 0
- ]
- }
- }
+ "stylelint": {
+ "extends": ["eslint-config-leaflink/stylelint"]
+ }
commitlint.config.js
file.
const config = require('eslint-config-leaflink/commitlint');
module.exports = config;
Note: It's recommended you attempt to remove as many of your specific overrides as possible and see how much can be autofixed to be inline with this shared configuration. You can extend from
leaflink
and set temporary overrides to turn some rules off in order to make the initial migration easier.
FAQs
Opinionated ESLint configuration for LeafLink's frontend repositories.
We found that eslint-config-leaflink demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.