ESLint configuration for Joggr projects.
yarn add -D @joggr/eslint-config \
eslint \
@eslint/js \
@types/eslint \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint-config-prettier \
eslint-plugin-jest \
eslint-config-standard-with-typescript \
eslint-plugin-filenames-simple \
eslint-plugin-import \
eslint-plugin-n \
eslint-plugin-promise
npm install --save-dev @joggr/eslint-config \
eslint \
@eslint/js \
@types/eslint \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint-config-prettier \
eslint-plugin-jest \
eslint-config-standard-with-typescript \
eslint-plugin-filenames-simple \
eslint-plugin-import \
eslint-plugin-n \
eslint-plugin-promise
.eslintrc.cjs
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ["@joggr/eslint-config"],
};
eslint.config.js
const { FlatCompat } = require("@eslint/eslintrc");
/** @type {import('eslint').Linter.Config} */
const config = {
root: true,
extends: ['@joggr/eslint-config'],
};
const compat = new FlatCompat();
module.exports = [
...compat.config(config)
];
Add additional packages.
yarn add -D eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-react-refresh \
eslint-plugin-storybook
.eslintrc.cjs
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ["@joggr/eslint-config/react"],
};
.eslintrc.cjs
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ["@joggr/eslint-config/node"],
};
You can add import order groups by extending the joggr
config and overriding the import/order
rule.
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: ['@joggr/eslint-config'],
overrides: [
{
files: ['*'],
rules: {
'import/order': [
'error',
{
pathGroups: [
{
pattern: '@lint/*',
group: 'internal',
position: 'before',
},
],
},
],
},
},
],
};
Licensed under MIT.
We'd love to have you join, but we are in closed beta.
You can join our waitlist below.