Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tjw-lint/eslint-config-tjw-base
The Jared Wilcurt's base ESLint rules
https://github.com/tjw-lint/eslint-config-tjw-base
eslint rules ruleset tjw
Last synced: 9 days ago
JSON representation
The Jared Wilcurt's base ESLint rules
- Host: GitHub
- URL: https://github.com/tjw-lint/eslint-config-tjw-base
- Owner: tjw-lint
- License: mit
- Created: 2019-09-04T12:29:33.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T02:31:00.000Z (11 days ago)
- Last Synced: 2024-11-06T03:29:16.251Z (11 days ago)
- Topics: eslint, rules, ruleset, tjw
- Language: JavaScript
- Homepage:
- Size: 105 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# eslint-config-tjw-base
The Jared Wilcurt's base ESLint 9+ rules for ESM projects.
For CJS and ESLint < v9, use v2.x releases.
## Using this
1. If you don't have a `package.json` do `npm init -y` first
1. Run `npm pkg set type=module`
1. Run `npm install --save-dev eslint eslint-config-tjw-base @stylistic/eslint-plugin-js`
1. In your `eslint.config.js` add `tjwBase` to your config like so:
```js
import js from '@eslint/js';
import tjwBase from 'eslint-config-tjw-base';
export default [
js.configs.recommended,
tjwBase,
{
// project specific settings
}
];
```
1. Run `npm pkg set scripts.lint="eslint *.js src"`
* Change `*.js src` to your files and folders you want to be linted
1. Run `npm run lint`If you already have a `no-restricted-syntax` rule, you can merge the ones that come with this config with your own, like so:
```js
// eslint.config.js
import js from '@eslint/js';
import baseRestrictedSyntax from 'eslint-config-tjw-base/no-restricted-syntax.js';
import tjwBase from 'eslint-config-tjw-base';export default [
js.configs.recommended,
tjwBase,
{
rules: {
'no-restricted-syntax': [
'error',
...baseRestrictedSyntax,
// your custom rules
]
}
}
];
```* * *
**See also:**
* [eslint-config-tjw-base](https://github.com/tjw-lint/eslint-config-tjw-base)
* [eslint-config-tjw-import](https://github.com/tjw-lint/eslint-config-tjw-import)
* [eslint-config-tjw-jest](https://github.com/tjw-lint/eslint-config-tjw-jest)
* [eslint-config-tjw-jsdoc](https://github.com/tjw-lint/eslint-config-tjw-jsdoc)
* [eslint-config-tjw-vue](https://github.com/tjw-lint/eslint-config-tjw-vue)