Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekil1100/eslint-config-like
ESLint config with common community rules. Supports TS, react, vue.
https://github.com/ekil1100/eslint-config-like
config eslint eslint-config jsx prettier react svelte3 typescript vue
Last synced: about 2 months ago
JSON representation
ESLint config with common community rules. Supports TS, react, vue.
- Host: GitHub
- URL: https://github.com/ekil1100/eslint-config-like
- Owner: ekil1100
- License: mit
- Created: 2020-07-30T05:02:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-17T22:39:52.000Z (about 1 year ago)
- Last Synced: 2024-10-20T05:09:09.047Z (2 months ago)
- Topics: config, eslint, eslint-config, jsx, prettier, react, svelte3, typescript, vue
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/eslint-config-like
- Size: 687 KB
- Stars: 5
- Watchers: 0
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-like
Personal eslint config. Supports typeScript, react, vue, next.js.
## Usage
```bash
pnpm add -D eslint eslint-config-like
```### Basic
```js
module.exports = {
extends: ['like'],
}
```with typescript
```js
module.exports = {
extends: ['like/ts'],
}
```### React
```js
module.exports = {
extends: ['like/react'],
}
```with typescript
```js
module.exports = {
extends: ['like/react-ts'],
}
```with next.js
```js
module.exports = {
extends: ['like/react', 'like/next'],
}
```### Vue
Default to vue3.
```js
module.exports = {
extends: ['like/vue'],
}
```with typescript
```js
module.exports = {
extends: ['like/vue-ts'],
}
```## Tips
### VSCode Settings
```json
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"json",
"jsonc",
"json5",
"yml",
"yaml"
],
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": false,
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
}
```### Babel parser
Sometimes, you may need add babel as parser for new language features. See [babel-eslint-parser](https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser) for more information.
```js
module.exports = {
parser: '@babel/eslint-parser',
}
```### Typescript path resolver
To enable typescript path resolvers in `.js` files, you can add settings:
```js
module.exports = {
settings: {
'import/resolver': {
typescript: {},
},
},
}
```### No need `import React from 'react'`?
If you are using react 17, you don't need to import React for JSX. See https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#removing-unused-react-imports.
⚠ It is default after v4.