@dauphaihau/eslint-config 0.2.3 → 0.3.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  - Auto fix for formatting (aimed to be used standalone without Prettier)
4
4
  - Opinionated, but very customizable
5
- - Auto-detects your tech stack (React, TypeScript, Tailwind, etc.)
5
+ - Auto-detects your tech stack (React, Vue, TypeScript, Tailwind, etc.)
6
6
  - ESLint Flat config, compose easily!
7
7
 
8
8
  ## Installation
@@ -11,19 +11,20 @@
11
11
  npm i -D @dauphaihau/eslint-config
12
12
  ```
13
13
 
14
- If your project uses React, install the React ESLint plugins as well:
14
+ Install extra plugins only if your project uses them:
15
15
 
16
16
  ```bash
17
+ # React
17
18
  npm i -D eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh
18
- ```
19
19
 
20
- If your project uses Tailwind CSS, install the Tailwind ESLint plugin as well:
20
+ # Vue
21
+ npm i -D eslint-plugin-vue vue-eslint-parser
21
22
 
22
- ```bash
23
+ # Tailwind CSS
23
24
  npm i -D eslint-plugin-tailwindcss
24
25
  ```
25
26
 
26
- And create `eslint.config.mjs` in your project root:
27
+ Create `eslint.config.mjs` in your project root:
27
28
 
28
29
  ```js
29
30
  // eslint.config.mjs
@@ -51,17 +52,11 @@ For example:
51
52
  ## Usage
52
53
 
53
54
  ### Basic
54
- Normally you only need to import the dauphaihauConfig preset:
55
+ Normally the default preset is enough:
55
56
 
56
57
  ```js
57
- // eslint.config.js
58
- import dauphaihauConfig from '@dauphaihau/eslint-config'
59
- import { defineConfig } from 'eslint/config'
60
-
61
- export default defineConfig([
62
- ...(await dauphaihauConfig())
63
- ])
64
- ```
58
+ export default defineConfig([...(await dauphaihauConfig())])
59
+ ```
65
60
 
66
61
  ### Customize
67
62
 
@@ -74,6 +69,7 @@ import { defineConfig } from 'eslint/config'
74
69
 
75
70
  export default defineConfig([
76
71
  ...(await dauphaihauConfig({
72
+ vue: false, // disable Vue rules
77
73
  tailwind: false, // disable Tailwind rules
78
74
  })),
79
75
 
@@ -0,0 +1,31 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __typeError = (msg) => {
4
+ throw TypeError(msg);
5
+ };
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
17
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
18
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
19
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
20
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
21
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
22
+
23
+ export {
24
+ __require,
25
+ __commonJS,
26
+ __publicField,
27
+ __privateGet,
28
+ __privateAdd,
29
+ __privateSet,
30
+ __privateMethod
31
+ };