- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .yarnrc.yml | ||
| index.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| yarn.lock | ||
@sethfalco/eslint-config
An opinionated ESLint config for my projects. Only intended to be used as a dev-dependency for the projects I (Seth Falco 👋) host and maintain.
This package exists so that it's easy to reuse the config across projects, and to worry less about keeping versions in sync between ESLint plugins.
Should you use this?
TL;DR: Probably not!
While others are welcome to depend on or derive from this package, it's seriously meant to be opinionated. The package enforces my style! There is a high chance that you won't agree with all rules, or that you'd wish some plugins it depends on wouldn't pollute your dependency tree.
There is nothing wrong with depending on this package, but if you like the style, you should probably consider copy and pasting the config from index.js instead.
Do what you want, though. Issues and pull requests welcome! 👍
Installation
Install the package through your package managers command-line:
yarn add --dev @sethfalco/eslint-config # or your package managers's equivalent
Usage
To use the config as-is:
eslint.config.mjs
import teapartyConfig from '@sethfalco/eslint-config';
export default teapartyConfig;
To override or extend rules:
eslint.config.mjs
import teapartyConfig from '@sethfalco/eslint-config';
/** @type {import('eslint').Linter.Config[]} */
export default [
// Order matters—add this before your rules so it doesn't override them.
...teapartyConfig,
// Now your rules! If we both configured the same rule, yours gets priority.
{
files: ['test/**/*.js'],
rules: {
'no-restricted-imports': ['error', {
patterns: [
{
regex: '../src',
message: 'Must use #src/ import alias in test source set.',
},
],
}],
},
},
];