@frabbit/eslint-config 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2021-PRESENT 三咲智子 (https://github.com/sxzz)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # @frabbit/eslint-config [![npm](https://img.shields.io/npm/v/@frabbit/eslint-config.svg)](https://npmjs.com/package/@frabbit/eslint-config)
2
+
3
+ Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3, Prettier.
4
+ based on https://github.com/sxzz/eslint-config
5
+
6
+ [Legacy Version](https://github.com/sxzz/eslint-config-legacy)
7
+
8
+ ## Features
9
+
10
+ - Format with Prettier.
11
+ - Designed to work with TypeScript, Vue 2 and 3 out-of-box.
12
+ - Support JSON(5), YAML, Markdown...
13
+ - Sort imports, `package.json`, `tsconfig.json`...
14
+ - [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), compose easily!
15
+ - Reasonable defaults, best practices, only one-line of config
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ npm i -D @frabbit/eslint-config
21
+ ```
22
+
23
+ Require Node.js >= 16.14.
24
+
25
+ ## Usage
26
+
27
+ ```js
28
+ // eslint.config.js
29
+ import { all } from '@frabbit/eslint-config'
30
+
31
+ export default all
32
+ ```
33
+
34
+ ### Custom Config
35
+
36
+ ```js
37
+ import { frabbit } from '@frabbit/eslint-config'
38
+ export default frabbit(
39
+ [
40
+ /* your custom config */
41
+ ],
42
+ { vue: true, prettier: true, markdown: true, unocss: false }
43
+ )
44
+ ```
45
+
46
+ ### VSCode
47
+
48
+ ```jsonc
49
+ {
50
+ "eslint.experimental.useFlatConfig": true
51
+ }
52
+ ```
53
+
54
+ ## Comparing to [`@antfu/eslint-config`](https://github.com/antfu/eslint-config)
55
+
56
+ Most of the rules are the same, but there are some differences:
57
+
58
+ - Use Prettier instead of [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic).
59
+ - Support both Vue 2 and Vue 3.
60
+ - Support Vue Reactivity Transform.
61
+ - More stricter rules.
62
+
63
+ ## Sponsors
64
+
65
+ <p align="center">
66
+ <a href="https://cdn.jsdelivr.net/gh/frabbit/sponsors/sponsors.svg">
67
+ <img src='https://cdn.jsdelivr.net/gh/frabbit/sponsors/sponsors.svg'/>
68
+ </a>
69
+ </p>
70
+
71
+ ## License
72
+
73
+ [MIT](./LICENSE) License © 2021-PRESENT [三咲智子](https://github.com/frenchrabbit)