@leancodepl/eslint-config 8.4.0 → 8.5.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/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.5.0](https://github.com/leancodepl/js_corelibrary/compare/v8.4.0...v8.5.0) (2025-07-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bring back brackets
11
+ ([27fa689](https://github.com/leancodepl/js_corelibrary/commit/27fa689f3ce69696343693223c858d7bfddfeaea))
12
+ - remove variableLike rule
13
+ ([c05bd8a](https://github.com/leancodepl/js_corelibrary/commit/c05bd8a1a2fe73b2cd3d161db838c39039858f60))
14
+ - simplify rules
15
+ ([79007f9](https://github.com/leancodepl/js_corelibrary/commit/79007f996a8529d6f9e6f2ac17b960b1a711bd72))
16
+
17
+ ### Features
18
+
19
+ - add consistent rule to curly
20
+ ([f9dfe3c](https://github.com/leancodepl/js_corelibrary/commit/f9dfe3c7c8e7909f42882f9d7d4dde4ce8e5d919))
21
+ - add linting rules
22
+ ([a2f4879](https://github.com/leancodepl/js_corelibrary/commit/a2f487916916c9bfa96da7e97da106036a237610))
23
+
24
+ # Change Log
25
+
26
+ All notable changes to this project will be documented in this file. See
27
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
28
+
6
29
  # [8.4.0](https://github.com/leancodepl/js_corelibrary/compare/v8.3.6...v8.4.0) (2025-06-20)
7
30
 
8
31
  ### Bug Fixes
package/README.md CHANGED
@@ -1,11 +1,52 @@
1
- # eslint-config
1
+ # @leancodepl/eslint-config
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ ESLint configurations for TypeScript and React projects.
4
4
 
5
- ## Building
5
+ ## Installation
6
6
 
7
- Run `nx build eslint-config` to build the library.
7
+ ```bash
8
+ npm install --save-dev @leancodepl/eslint-config
9
+ # or
10
+ yarn add --dev @leancodepl/eslint-config
11
+ ```
8
12
 
9
- ## Running unit tests
13
+ ## Available Configurations
10
14
 
11
- Run `nx test eslint-config` to execute the unit tests via [Jest](https://jestjs.io).
15
+ - `base` - Core TypeScript rules with sorting and code quality
16
+ - `baseReact` - React-specific rules and JSX formatting
17
+ - `imports` - Import/export organization and unused import detection
18
+ - `a11y` - Accessibility rules for React components
19
+
20
+ ## Usage Examples
21
+
22
+ ### React TypeScript Project
23
+
24
+ ```javascript
25
+ // eslint.config.js
26
+ import { base, baseReact, imports, a11y } from '@leancodepl/eslint-config';
27
+
28
+ export default [
29
+ ...base,
30
+ ...baseReact,
31
+ ...imports,
32
+ ...a11y,
33
+ ];
34
+ ```
35
+
36
+ ### Custom Rules
37
+
38
+ ```javascript
39
+ // eslint.config.js
40
+ import { base, baseReact } from '@leancodepl/eslint-config';
41
+
42
+ export default [
43
+ ...base,
44
+ ...baseReact,
45
+ {
46
+ rules: {
47
+ 'max-params': ['error', { max: 6 }],
48
+ 'no-console': 'off',
49
+ },
50
+ },
51
+ ];
52
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/eslint-config",
3
- "version": "8.4.0",
3
+ "version": "8.5.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "src/index.js",
6
6
  "dependencies": {
@@ -17,5 +17,35 @@
17
17
  "eslint-plugin-react": ">=7.34.1",
18
18
  "prettier": ">=3.0.0",
19
19
  "typescript-eslint": ">=7.0.0"
20
- }
20
+ },
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "registry": "https://registry.npmjs.org/"
24
+ },
25
+ "engines": {
26
+ "node": ">=18.0.0"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/leancodepl/js_corelibrary.git",
31
+ "directory": "packages/linters/eslint-config"
32
+ },
33
+ "homepage": "https://github.com/leancodepl/js_corelibrary",
34
+ "bugs": {
35
+ "url": "https://github.com/leancodepl/js_corelibrary/issues"
36
+ },
37
+ "description": "ESLint configuration for LeanCode projects",
38
+ "keywords": [
39
+ "eslint",
40
+ "config",
41
+ "linting",
42
+ "javascript",
43
+ "typescript",
44
+ "leancode"
45
+ ],
46
+ "author": {
47
+ "name": "LeanCode",
48
+ "url": "https://leancode.co"
49
+ },
50
+ "sideEffects": false
21
51
  }
package/src/lib/base.js CHANGED
@@ -6,6 +6,7 @@ module.exports = [
6
6
  perfectionist,
7
7
  },
8
8
  rules: {
9
+ curly: ["error", "multi-line", "consistent"],
9
10
  "max-params": ["error", { max: 4 }],
10
11
  "no-console": ["warn", { allow: ["warn", "error", "assert"] }],
11
12
  "no-eval": "error",
@@ -14,7 +15,14 @@ module.exports = [
14
15
  "@typescript-eslint/no-empty-function": "off",
15
16
  "@typescript-eslint/no-empty-object-type": "off",
16
17
  "@typescript-eslint/no-explicit-any": "off",
17
-
18
+ "@typescript-eslint/naming-convention": [
19
+ "error",
20
+ {
21
+ selector: "variable",
22
+ format: ["camelCase", "PascalCase"],
23
+ leadingUnderscore: "allow",
24
+ },
25
+ ],
18
26
  "perfectionist/sort-array-includes": [
19
27
  "error",
20
28
  {