@bratislava/eslint-config 0.9.0 → 0.11.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.
Files changed (3) hide show
  1. package/README.md +62 -0
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @bratislava/eslint-config
2
+
3
+ Base ESLint configuration for Bratislava projects. Built for ESLint v9 flat config format.
4
+
5
+ Part of a monorepo of shareable ESLint configurations — see the [full repo](https://github.com/bratislava/eslint-config) for NestJS, Next.js, and React variants.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install --save-dev @bratislava/eslint-config eslint typescript
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Create `eslint.config.mjs` in your project root:
16
+
17
+ ```javascript
18
+ import baseConfig from "@bratislava/eslint-config";
19
+
20
+ export default baseConfig;
21
+ ```
22
+
23
+ Or use individual exports to compose your own config:
24
+
25
+ ```javascript
26
+ import {
27
+ baseConfig,
28
+ typescriptRules,
29
+ eslintRules,
30
+ sonarjsRules,
31
+ simpleImportSortConfig,
32
+ } from "@bratislava/eslint-config";
33
+ ```
34
+
35
+ ## What's Included
36
+
37
+ - **ESLint recommended** rules
38
+ - **TypeScript ESLint** strict and stylistic rules
39
+ - **Prettier** integration (disables conflicting rules)
40
+ - **Security** plugin for detecting security vulnerabilities
41
+ - **No-unsanitized** plugin for preventing XSS
42
+ - **SonarJS** plugin for code quality
43
+ - **Simple import sort** for consistent import ordering
44
+ - **Import** plugin for import/export linting
45
+ - **Markdown** linting support
46
+
47
+ ## Peer Dependencies
48
+
49
+ - `eslint` >= 9
50
+ - `typescript` >= 5
51
+
52
+ ## Other Packages
53
+
54
+ | Package | Description |
55
+ | --------------------------------- | ------------------------------ |
56
+ | `@bratislava/eslint-config-nest` | NestJS backend configuration |
57
+ | `@bratislava/eslint-config-next` | Next.js frontend configuration |
58
+ | `@bratislava/eslint-config-react` | React configuration |
59
+
60
+ ## License
61
+
62
+ EUPL-1.2
package/index.js CHANGED
@@ -87,7 +87,7 @@ export const eslintRules = {
87
87
  "no-caller": "error",
88
88
  "no-div-regex": "error",
89
89
  "no-else-return": "error",
90
- "no-implicit-coercion": "error",
90
+ "no-implicit-coercion": ["error", { boolean: false }],
91
91
  "no-invalid-this": "error",
92
92
  "no-lonely-if": "error",
93
93
  "no-param-reassign": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bratislava/eslint-config",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "Base ESLint configuration for Bratislava projects",
5
5
  "keywords": [
6
6
  "eslint",