@cookshack/eslint-config 3.0.0 → 5.0.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/AGENTS.md +12 -0
- package/dist/formatter.cjs +2 -1
- package/dist/formatter.js +2 -1
- package/dist/index.cjs +344 -199
- package/dist/index.js +344 -199
- package/formatter.js +2 -1
- package/index.js +63 -67
- package/package.json +1 -1
- package/plugins/always-let.js +5 -4
- package/plugins/fn-args-nl.js +47 -0
- package/plugins/fn-decl-block-start.js +1 -2
- package/plugins/indent-struct.js +145 -0
- package/plugins/init-before-use.js +57 -62
- package/plugins/narrowest-scope.js +24 -25
- package/plugins/positive-vibes.js +15 -15
- package/plugins/use-risky-equal.js +7 -5
- package/plugins/var-decl-block-start.js +2 -2
- package/test/rules/fn-args-nl.js +114 -0
- package/test/rules/indent-struct.js +198 -0
- package/test/rules/init-before-use.js +8 -4
- package/test/rules/narrowest-scope.js +10 -5
- package/test/rules/no-shadow.js +42 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
- `dist/` is gitignored and must be rebuilt after source changes: `npm run prepare` (runs husky + rollup)
|
|
4
|
+
- Self-lint: `npm run check` (uses this config to lint itself)
|
|
5
|
+
- Tests: `npm test` (mocha, `test/**/*.js`)
|
|
6
|
+
- Pre-commit hook runs `npm run check && npm test`
|
|
7
|
+
- Custom ESLint rules live in `plugins/` and are wired into the config via `index.js`
|
|
8
|
+
- Each plugin has a corresponding test file in `test/rules/` with the same name
|
|
9
|
+
- Tests use ESLint's `Linter` API directly; many test the print buffer output via `getPrintBuffer()`
|
|
10
|
+
- `plugins/narrowest-scope.js` has extensive analysis docs in `A1.md` through `A7.md`
|
|
11
|
+
- Rollup bundles `index.js` and `formatter.js` into `dist/` as both ESM (`.js`) and CJS (`.cjs`); `globals` is external
|
|
12
|
+
- Package is ESM (`"type": "module"`) but ships dual format via the `exports` field
|
package/dist/formatter.cjs
CHANGED
package/dist/formatter.js
CHANGED