@limulus/eslint-config 5.1.0 → 6.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.
Files changed (3) hide show
  1. package/README.md +13 -9
  2. package/index.js +18 -9
  3. package/package.json +13 -12
package/README.md CHANGED
@@ -6,18 +6,22 @@ Feel free to use for your own projects, but it is entirely subject to my own whi
6
6
 
7
7
  ## Set Up
8
8
 
9
- Add a `.eslintrc.js`:
9
+ Add an `eslint.config.js`:
10
10
 
11
11
  ```js
12
- module.exports = {
13
- "extends": ["@limulus"],
14
- "overrides": [
15
- {
16
- "files": ["*.ts", "*.tsx", "*.d.ts"],
17
- "parserOptions": { "project": "./tsconfig.json" }
12
+ import config from '@limulus/eslint-config'
13
+
14
+ export default [
15
+ ...config,
16
+ {
17
+ files: ['**/*.ts', '**/*.tsx', '**/*.d.ts'],
18
+ languageOptions: {
19
+ parserOptions: {
20
+ project: './tsconfig.json'
21
+ }
18
22
  }
19
- ]
20
- }
23
+ }
24
+ ]
21
25
  ```
22
26
 
23
27
  Add a `prettier.config.js`:
package/index.js CHANGED
@@ -1,10 +1,19 @@
1
- module.exports = {
2
- env: {
3
- browser: true,
4
- node: true,
1
+ const { defineConfig } = require('eslint/config')
2
+ const globals = require('globals')
3
+ const webConfig = require('eslint-config-universe/flat/web')
4
+ const typescriptAnalysisConfig = require('eslint-config-universe/flat/shared/typescript-analysis')
5
+
6
+ module.exports = defineConfig([
7
+ ...webConfig,
8
+ ...typescriptAnalysisConfig,
9
+ {
10
+ languageOptions: {
11
+ globals: {
12
+ ...globals.node,
13
+ },
14
+ },
15
+ rules: {
16
+ 'no-nested-ternary': 'error',
17
+ },
5
18
  },
6
- extends: ['universe/web', 'universe/shared/typescript-analysis'],
7
- rules: {
8
- 'no-nested-ternary': 'error',
9
- },
10
- }
19
+ ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limulus/eslint-config",
3
- "version": "5.1.0",
3
+ "version": "6.0.0",
4
4
  "description": "A shared ESLint configuration",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/limulus/eslint-config.git",
@@ -16,27 +16,28 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "test": "echo 'No tests, just pass.'",
19
- "prepare": "is-ci || husky install"
19
+ "prepare": "husky"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "eslint-config-universe": "^13.0.0"
25
+ "eslint-config-universe": "^15.0.3",
26
+ "globals": "^16.2.0"
26
27
  },
27
28
  "peerDependencies": {
28
- "eslint": "^8.0.0",
29
+ "eslint": ">=9",
29
30
  "prettier": ">=3",
30
31
  "typescript": ">=5"
31
32
  },
32
33
  "devDependencies": {
33
- "@commitlint/cli": "^18.2.0",
34
- "@commitlint/config-conventional": "^18.1.0",
35
- "eslint": "^8.52.0",
36
- "husky": "^7.0.0",
37
- "is-ci": "^3.0.1",
38
- "prettier": "^3.0.3",
39
- "semantic-release": "^22.0.5",
40
- "typescript": "^5.2.2"
34
+ "@commitlint/cli": "^19.8.1",
35
+ "@commitlint/config-conventional": "^19.8.1",
36
+ "eslint": "^9.27.0",
37
+ "husky": "^9.1.7",
38
+ "is-ci": "^4.1.0",
39
+ "prettier": "^3.5.3",
40
+ "semantic-release": "^24.2.5",
41
+ "typescript": "^5.8.3"
41
42
  }
42
43
  }