@jsse/eslint-config 0.0.1

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
+ MIT License
2
+
3
+ Copyright (c) 2023-PRESENT Jesse K Rubin <https://github.com/jessekrubin>
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,93 @@
1
+ # @jsse/eslint-config
2
+
3
+ Eslint config
4
+
5
+ - eslint flat config
6
+ - double quotes + semi
7
+ - react, react-hooks & react-refresh, OH MY!
8
+ - no vue (I don't use vue (as of 2023-10-12) don't want/need the vue plugins/parsers/etc)
9
+ - assumes you're using prettier
10
+ - Based on:
11
+ - My old, very long, and very messy (non-flat) eslint config (`.eslintrc.js`)
12
+ - antfu eslint-config [eslint-config](https://github.com/antfu/eslint-config)
13
+ - sxzz eslint-config [eslint-config](https://github.com/sxzz/eslint-config)
14
+
15
+ ## Usage
16
+
17
+ ### Install
18
+
19
+ ```bash
20
+ pnpm i -D eslint @jsse/eslint-config
21
+ ```
22
+
23
+ ### Create config file
24
+
25
+ With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in `package.json` (recommended):
26
+
27
+ ```js
28
+ // eslint.config.js
29
+ import jsse from "@jsse/eslint-config";
30
+
31
+ export default jsse();
32
+ ```
33
+
34
+ With CJS:
35
+
36
+ ```js
37
+ // eslint.config.js
38
+ const jsse = require("@jsse/eslint-config").default;
39
+
40
+ module.exports = antfu();
41
+ ```
42
+
43
+ > Note that `.eslintignore` no longer works in Flat config, see [customization](#customization) for more details.
44
+
45
+ ### Add script for package.json
46
+
47
+ For example:
48
+
49
+ ```json
50
+ {
51
+ "scripts": {
52
+ "lint": "eslint .",
53
+ "lint:fix": "eslint . --fix"
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### Type Aware Rules
59
+
60
+ You can optionally enable the [type aware rules](https://typescript-eslint.io/linting/typed-linting/) by passing the
61
+ options object to the `typescript` config:
62
+
63
+ ```js
64
+ // eslint.config.js
65
+ import jsse from "@jsse/eslint-config";
66
+
67
+ export default jsse({
68
+ typescript: {
69
+ tsconfigPath: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
70
+ },
71
+ });
72
+ ```
73
+
74
+ ## Thanks
75
+
76
+ - [antfu](https://github.com/antfu) and [sxzz](https://github.com/sxzz) for their eslint-configs which
77
+ this is based on
78
+ - Younger me for being more willing to spend time configuring eslint
79
+ - My fans for being my fans
80
+
81
+ ## FAQ
82
+
83
+ ### Why use prettier?
84
+
85
+ I DO NOT CARE ANYMORE... My current stance on formatters is pick one that is stable, and use it, preferably with the
86
+ default config.
87
+
88
+ A younger me (jessekrubin) would take the time to configure a formatter/linter/code style to my liking, but I really
89
+ don't care anymore...
90
+
91
+ ## License
92
+
93
+ [MIT](./LICENSE) License &copy; 2019-PRESENT [Anthony Fu](https://github.com/antfu)