https://github.com/stormwarning/zazen-eslint-config
⛩ Lint JavaScript, free of weariness and confusion
https://github.com/stormwarning/zazen-eslint-config
code-style eslint-config xo
Last synced: about 1 year ago
JSON representation
⛩ Lint JavaScript, free of weariness and confusion
- Host: GitHub
- URL: https://github.com/stormwarning/zazen-eslint-config
- Owner: stormwarning
- License: isc
- Created: 2018-02-14T18:53:41.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T19:01:21.000Z (over 1 year ago)
- Last Synced: 2024-10-11T07:12:31.003Z (over 1 year ago)
- Topics: code-style, eslint-config, xo
- Language: JavaScript
- Homepage:
- Size: 887 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# zazen-eslint-config
[![npm version][npm-img]][npm-url]
[![npm downloads][npm-dls]][npm-url]
[ESLint][] configuration for [zazen][]-generated projects.
## Usage
Install the conventions by running:
```shell
npm install --save-dev eslint @zazen/eslint-config
```
Add the extends to your `.eslintrc.js`:
```js
{
extends: ['@zazen'],
rules: { /* … */ },
}
```
Add the Prettier settings to your `package.json`:
```json
"prettier": {
"semi": false,
"singleQuote": true,
"trailingComma": "all"
},
```
### Node projects
Extend the base config as well as the Node-specific rules:
```js
{
extends: ['@zazen', '@zazen/eslint-config/node'],
rules: { /* … */ },
}
```
### TypeScript projects
Extend the base config as well as the TypeScript-specific rules:
```js
{
extends: ['@zazen', '@zazen/eslint-config/typescript'],
rules: { /* … */ },
}
```
This can be used for JavaScript code as well, but will require a `tsconfig.json` file to be present.
### Vue.js projects
Removed for now until/unless I get more opinionated about Vue code. For now, install `eslint-plugin-vue` per-project, and extend the recommended config in addition to the base config here.
```js
{
extends: [
'plugin:vue/[vue3-]recommended',
'@zazen',
'prettier',
],
rules: { /* … */ },
}
```
The TypeScript rules can be included as well, but remember to [set the `parser` option correctly](https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error).
[npm-url]: https://www.npmjs.com/package/@zazen/eslint-config
[npm-img]: https://img.shields.io/npm/v/@zazen/eslint-config.svg?style=flat-square
[npm-dls]: https://img.shields.io/npm/dt/@zazen/eslint-config.svg?style=flat-square
[issues-url]: https://github.com/stormwarning/zazen-eslint-config/issues
[issues-img]: https://img.shields.io/github/issues/stormwarning/zazen-eslint-config.svg?style=flat-square
[eslint]: https://eslint.org
[zazen]: https://github.com/stormwarning/zazen