@nexim/eslint-config 1.1.1 → 2.0.0-alpha.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/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.0-alpha.1](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@2.0.0-alpha.0...@nexim/eslint-config@2.0.0-alpha.1) (2025-01-22)
7
+
8
+ **Note:** Version bump only for package @nexim/eslint-config
9
+
10
+ ## [2.0.0-alpha.0](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@1.1.1...@nexim/eslint-config@2.0.0-alpha.0) (2025-01-22)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ * **eslint:** migrate to eslint v9 flat config
15
+
16
+ ### Features
17
+
18
+ * **eslint-config:** add tsdoc plugin ([82e9336](https://github.com/the-nexim/nanolib/commit/82e93365c3d61295586ea6d33306bbded46a1fee)) by @njfamirm
19
+
20
+ ### Code Refactoring
21
+
22
+ * **eslint:** migrate to eslint v9 flat config ([e458757](https://github.com/the-nexim/nanolib/commit/e4587570e202569ef1f7b06aab2d5bdf9a66bb8f)) by @njfamirm
23
+
6
24
  ## [1.1.1](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@1.1.0...@nexim/eslint-config@1.1.1) (2025-01-05)
7
25
 
8
26
  **Note:** Version bump only for package @nexim/eslint-config
package/README.md CHANGED
@@ -5,30 +5,48 @@
5
5
  ![NPM Downloads](https://img.shields.io/npm/dm/@nexim/eslint-config)
6
6
  ![NPM License](https://img.shields.io/npm/l/@nexim/eslint-config)
7
7
 
8
- ## Overview
9
-
10
- Alwatr ECMAScript Style Guide as a ESLint [shareable configurations](http://eslint.org/docs/developer-guide/shareable-configs.html).
8
+ Nexim ECMAScript Style Guide as a ESLint [shareable configurations](http://eslint.org/docs/developer-guide/shareable-configs.html).
11
9
 
12
10
  ## Installation
13
11
 
14
12
  ```bash
15
- yarn add -D @nexim/eslint-config \
16
- eslint \
17
- @typescript-eslint/parser \
18
- @typescript-eslint/eslint-plugin \
19
- eslint-plugin-import \
20
- eslint-import-resolver-typescript
13
+ yarn add -D @nexim/eslint-config eslint @eslint/compat
21
14
  ```
22
15
 
23
16
  ## Usage
24
17
 
25
- Create a `.eslintrc.json` file in the root of your project:
18
+ Create a `eslint.config.mjs` file in the root of your project:
19
+
20
+ ```js
21
+ import { baseExtends, jsConfigs, tsConfig } from '@nexim/eslint-config';
22
+ import { fileURLToPath } from 'node:url';
23
+ import { includeIgnoreFile } from '@eslint/compat';
24
+ import path from 'node:path';
25
+
26
+ // pass gitignore file content as ignorePatterns
27
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
28
+ const gitignorePath = path.resolve(__dirname, '.gitignore');
29
+ const ignorePatterns = includeIgnoreFile(gitignorePath).ignores;
30
+
31
+ // add your custom folders to ignore
32
+ ignorePatterns?.push('.yarn');
33
+
34
+ export default [
35
+ ...baseExtends,
36
+ ...tsConfig,
37
+ ...jsConfigs,
38
+ {
39
+ ignores: ignorePatterns,
40
+ },
41
+ ];
42
+ ```
43
+
44
+ Run ESLint:
26
45
 
27
- ```json
28
- {
29
- "extends": "@nexim/eslint-config",
30
- "rules": {
31
- // Additional, per-project rules...
32
- }
33
- }
46
+ ```bash
47
+ eslint . --config eslint.config.mjs --cache
34
48
  ```
49
+
50
+ ## Idea
51
+
52
+ It's possible to generate a full eslint json bundle in build time and use them in project to figure out changes.
@@ -0,0 +1,2 @@
1
+ export declare const baseExtends: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ //# sourceMappingURL=extended-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extended-config.d.ts","sourceRoot":"","sources":["../../src/lib/extended-config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,qEAOvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const jsConfigs: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ //# sourceMappingURL=javascript-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"javascript-config.d.ts","sourceRoot":"","sources":["../../src/lib/javascript-config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,qEAmBpB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const tsConfig: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ //# sourceMappingURL=typescript-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript-config.d.ts","sourceRoot":"","sources":["../../src/lib/typescript-config.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,QAAQ,qEAoEnB,CAAC"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './lib/typescript-config.js';
2
+ export * from './lib/javascript-config.js';
3
+ export * from './lib/extended-config.js';
4
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC"}
package/dist/main.mjs ADDED
@@ -0,0 +1,118 @@
1
+ /* @nexim/eslint-config v2.0.0-alpha.1 */
2
+
3
+ // src/lib/typescript-config.ts
4
+ import * as globals from "globals";
5
+ import stylistic from "@stylistic/eslint-plugin";
6
+ import tsdocPlugin from "eslint-plugin-tsdoc";
7
+ import tseslint from "typescript-eslint";
8
+ var tsconfigRootDir = import.meta.dirname;
9
+ var tsConfig = tseslint.config({
10
+ files: ["**/*.ts", "**/*.mjs", "**/*.cjs", "**/*.js"],
11
+ languageOptions: {
12
+ globals: {
13
+ ...globals["shared-node-browser"]
14
+ },
15
+ ecmaVersion: "latest",
16
+ sourceType: "module",
17
+ parser: tseslint.parser,
18
+ parserOptions: {
19
+ projectService: true,
20
+ tsconfigRootDir
21
+ }
22
+ },
23
+ plugins: {
24
+ "@typescript-eslint": tseslint.plugin,
25
+ "@stylistic": stylistic,
26
+ tsdoc: tsdocPlugin
27
+ },
28
+ rules: {
29
+ "@stylistic/max-len": ["error", { code: 140 }],
30
+ "no-eval": ["error", { allowIndirect: true }],
31
+ "@stylistic/no-floating-decimal": "error",
32
+ "@stylistic/space-infix-ops": "error",
33
+ "new-cap": ["error", { capIsNewExceptionPattern: "Mini$" }],
34
+ "@stylistic/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
35
+ "@stylistic/array-bracket-spacing": ["error", "always"],
36
+ "@stylistic/indent": [
37
+ "error",
38
+ 2,
39
+ {
40
+ SwitchCase: 1,
41
+ VariableDeclarator: 1,
42
+ outerIIFEBody: 1,
43
+ MemberExpression: 1,
44
+ FunctionDeclaration: { parameters: 1, body: 1 },
45
+ FunctionExpression: { parameters: 1, body: 1 },
46
+ CallExpression: { arguments: 1 },
47
+ ArrayExpression: 1,
48
+ ObjectExpression: 1,
49
+ ImportDeclaration: 1,
50
+ flatTernaryExpressions: false,
51
+ ignoreComments: false,
52
+ ignoredNodes: [
53
+ "TemplateLiteral *",
54
+ "TSTypeParameterInstantiation",
55
+ "FunctionExpression > .params[decorators.length > 0]",
56
+ "FunctionExpression > .params > :matches(Decorator, :not(:first-child))",
57
+ "ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"
58
+ ]
59
+ }
60
+ ],
61
+ "@stylistic/operator-linebreak": ["error", "after", { overrides: { "?": "before", ":": "before" } }],
62
+ "@stylistic/semi": "error",
63
+ "tsdoc/syntax": "warn",
64
+ "no-unused-vars": "off",
65
+ "prefer-const": "error",
66
+ "sort-imports": ["error"],
67
+ "@typescript-eslint/prefer-string-starts-ends-with": "off",
68
+ "@typescript-eslint/no-dynamic-delete": "off",
69
+ "@typescript-eslint/no-non-null-assertion": "off",
70
+ "no-unused-labels": "off",
71
+ "require-await": "error",
72
+ "@typescript-eslint/consistent-type-definitions": "off"
73
+ }
74
+ });
75
+
76
+ // src/lib/javascript-config.ts
77
+ import * as globals2 from "globals";
78
+ import tsdocPlugin2 from "eslint-plugin-tsdoc";
79
+ import tseslint2 from "typescript-eslint";
80
+ var jsConfigs = tseslint2.config({
81
+ extends: [tseslint2.configs.disableTypeChecked],
82
+ files: ["*.{mjs,js,cjs}", "**/*.{mjs,js,cjs}"],
83
+ plugins: {
84
+ "@typescript-eslint": tseslint2.plugin,
85
+ tsdoc: tsdocPlugin2
86
+ },
87
+ languageOptions: {
88
+ globals: {
89
+ ...globals2.commonjs,
90
+ ...globals2.node
91
+ },
92
+ sourceType: "commonjs"
93
+ },
94
+ rules: {
95
+ "@typescript-eslint/no-require-imports": "off",
96
+ "@typescript-eslint/explicit-module-boundary-types": "off",
97
+ "tsdoc/syntax": "off"
98
+ }
99
+ });
100
+
101
+ // src/lib/extended-config.ts
102
+ import eslintJs from "@eslint/js";
103
+ import tseslint3 from "typescript-eslint";
104
+ var baseExtends = tseslint3.config(
105
+ eslintJs.configs.recommended,
106
+ tseslint3.configs.strict,
107
+ tseslint3.configs.stylistic,
108
+ tseslint3.configs.strictTypeChecked,
109
+ tseslint3.configs.stylisticTypeChecked,
110
+ tseslint3.configs.recommendedTypeChecked
111
+ );
112
+ export {
113
+ baseExtends,
114
+ jsConfigs,
115
+ tsConfig
116
+ };
117
+ /*! For license information please see main.mjs.LEGAL.txt */
118
+ //# sourceMappingURL=main.mjs.map
File without changes
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/lib/typescript-config.ts", "../src/lib/javascript-config.ts", "../src/lib/extended-config.ts"],
4
+ "sourcesContent": ["import * as globals from 'globals';\nimport stylistic from '@stylistic/eslint-plugin';\nimport tsdocPlugin from 'eslint-plugin-tsdoc';\nimport tseslint from 'typescript-eslint';\n\nconst tsconfigRootDir = import.meta.dirname;\n\nexport const tsConfig = tseslint.config({\n files: [ '**/*.ts', '**/*.mjs', '**/*.cjs', '**/*.js' ],\n languageOptions: {\n globals: {\n ...globals['shared-node-browser'],\n },\n ecmaVersion: 'latest',\n sourceType: 'module',\n parser: tseslint.parser,\n parserOptions: {\n projectService: true,\n tsconfigRootDir,\n },\n },\n plugins: {\n '@typescript-eslint': tseslint.plugin,\n '@stylistic': stylistic,\n tsdoc: tsdocPlugin,\n },\n rules: {\n '@stylistic/max-len': [ 'error', { code: 140 } ],\n 'no-eval': [ 'error', { allowIndirect: true } ],\n '@stylistic/no-floating-decimal': 'error',\n '@stylistic/space-infix-ops': 'error',\n 'new-cap': [ 'error', { capIsNewExceptionPattern: 'Mini$' } ],\n '@stylistic/brace-style': [ 'error', 'stroustrup', { allowSingleLine: true } ],\n '@stylistic/array-bracket-spacing': [ 'error', 'always' ],\n '@stylistic/indent': [\n 'error',\n 2,\n {\n SwitchCase: 1,\n VariableDeclarator: 1,\n outerIIFEBody: 1,\n MemberExpression: 1,\n FunctionDeclaration: { parameters: 1, body: 1 },\n FunctionExpression: { parameters: 1, body: 1 },\n CallExpression: { arguments: 1 },\n ArrayExpression: 1,\n ObjectExpression: 1,\n ImportDeclaration: 1,\n flatTernaryExpressions: false,\n ignoreComments: false,\n ignoredNodes: [\n 'TemplateLiteral *',\n 'TSTypeParameterInstantiation',\n 'FunctionExpression > .params[decorators.length > 0]',\n 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',\n 'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key',\n ],\n },\n ],\n '@stylistic/operator-linebreak': [ 'error', 'after', { overrides: { '?': 'before', ':': 'before' } } ],\n\n '@stylistic/semi': 'error',\n 'tsdoc/syntax': 'warn',\n\n 'no-unused-vars': 'off',\n 'prefer-const': 'error',\n 'sort-imports': [ 'error' ],\n\n '@typescript-eslint/prefer-string-starts-ends-with': 'off',\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/no-non-null-assertion': 'off',\n 'no-unused-labels': 'off',\n 'require-await': 'error',\n '@typescript-eslint/consistent-type-definitions': 'off',\n },\n});\n", "import * as globals from 'globals';\nimport tsdocPlugin from 'eslint-plugin-tsdoc';\nimport tseslint from 'typescript-eslint';\n\nexport const jsConfigs = tseslint.config({\n extends: [ tseslint.configs.disableTypeChecked ],\n files: [ '*.{mjs,js,cjs}', '**/*.{mjs,js,cjs}' ],\n plugins: {\n '@typescript-eslint': tseslint.plugin,\n tsdoc: tsdocPlugin,\n },\n languageOptions: {\n globals: {\n ...globals.commonjs,\n ...globals.node,\n },\n sourceType: 'commonjs',\n },\n rules: {\n '@typescript-eslint/no-require-imports': 'off',\n '@typescript-eslint/explicit-module-boundary-types': 'off',\n 'tsdoc/syntax': 'off',\n },\n});\n", "import eslintJs from '@eslint/js';\nimport tseslint from 'typescript-eslint';\n\nexport const baseExtends = tseslint.config(\n eslintJs.configs.recommended,\n tseslint.configs.strict,\n tseslint.configs.stylistic,\n tseslint.configs.strictTypeChecked,\n tseslint.configs.stylisticTypeChecked,\n tseslint.configs.recommendedTypeChecked,\n);\n"],
5
+ "mappings": "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",
6
+ "names": ["globals", "tsdocPlugin", "tseslint", "tseslint"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexim/eslint-config",
3
- "version": "1.1.1",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "Base Eslint configuration for Nexim projects.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -37,31 +37,91 @@
37
37
  "contributors": [
38
38
  "Arash Ghardashpoor <arash.qardashpoor@gmail.com> (https://www.agpagp.ir)"
39
39
  ],
40
- "type": "commonjs",
41
- "main": "./eslint-config.cjs",
40
+ "type": "module",
41
+ "exports": {
42
+ ".": {
43
+ "types": "./dist/main.d.ts",
44
+ "import": "./dist/main.mjs"
45
+ }
46
+ },
47
+ "main": "./dist/main.mjs",
48
+ "module": "./dist/main.mjs",
49
+ "types": "./dist/main.d.ts",
42
50
  "files": [
43
51
  "**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
44
52
  "LICENSE"
45
53
  ],
46
- "devDependencies": {
47
- "@typescript-eslint/eslint-plugin": "^7.15.0",
48
- "@typescript-eslint/parser": "^7.15.0",
49
- "eslint": "^8.57.1",
50
- "eslint-import-resolver-typescript": "^3.6.3",
54
+ "scripts": {
55
+ "build": "wireit",
56
+ "watch": "wireit"
57
+ },
58
+ "dependencies": {
59
+ "@eslint/compat": "^1.2.5",
60
+ "@eslint/js": "^9.18.0",
61
+ "@stylistic/eslint-plugin": "^2.13.0",
62
+ "eslint": "^9.18.0",
51
63
  "eslint-plugin-import": "^2.31.0",
52
- "eslint-plugin-require-extensions": "^0.1.3",
53
- "typescript": "^5.7.2"
64
+ "eslint-plugin-tsdoc": "^0.4.0",
65
+ "globals": "^15.14.0",
66
+ "typescript-eslint": "^8.21.0"
67
+ },
68
+ "devDependencies": {
69
+ "@alwatr/nano-build": "^5.0.0",
70
+ "@alwatr/type-helper": "^5.0.0",
71
+ "@nexim/typescript-config": "^2.0.0",
72
+ "@types/eslint": "^9.6.1",
73
+ "@types/node": "^22.10.7",
74
+ "typescript": "^5.7.3",
75
+ "wireit": "^0.14.9"
54
76
  },
55
77
  "peerDependencies": {
56
- "@typescript-eslint/eslint-plugin": ">7.0.0 <8.0.0",
57
- "@typescript-eslint/parser": ">7.0.0 <8.0.0",
58
- "eslint": ">8.0.0 <9.0.0",
59
- "eslint-import-resolver-typescript": ">3.0.0",
60
- "eslint-plugin-import": ">2.0.0",
61
- "eslint-plugin-require-extensions": ">0.1.0"
78
+ "@eslint/compat": ">1.0.0 <2.0.0",
79
+ "eslint": ">9.0.0 <10.0.0"
62
80
  },
63
81
  "publishConfig": {
64
82
  "access": "public"
65
83
  },
66
- "gitHead": "52096aedc16222a434b2badfe7e860f671c1c5f8"
84
+ "nano-build": {
85
+ "platform": "node",
86
+ "cjs": false
87
+ },
88
+ "wireit": {
89
+ "build": {
90
+ "dependencies": [
91
+ "build:type",
92
+ "build:es"
93
+ ]
94
+ },
95
+ "build:es": {
96
+ "command": "nano-build --preset=module",
97
+ "files": [
98
+ "src",
99
+ "tsconfig.json"
100
+ ],
101
+ "clean": "if-file-deleted",
102
+ "output": [
103
+ "dist",
104
+ "tsconfig.tsbuildinfo"
105
+ ]
106
+ },
107
+ "build:type": {
108
+ "command": "tsc --build"
109
+ },
110
+ "watch": {
111
+ "dependencies": [
112
+ "watch:ts"
113
+ ]
114
+ },
115
+ "watch:ts": {
116
+ "command": "tsc --build --watch --preserveWatchOutput",
117
+ "dependencies": [
118
+ "watch:es"
119
+ ]
120
+ },
121
+ "watch:es": {
122
+ "command": "nano-build --preset=module -- --watch",
123
+ "service": true
124
+ }
125
+ },
126
+ "gitHead": "ed72ebc29e13003729801c36d67fe371a62b4937"
67
127
  }
package/eslint-config.cjs DELETED
@@ -1,94 +0,0 @@
1
- /**
2
- * @type {import('eslint').Linter.Config}
3
- */
4
- module.exports = {
5
- extends: [
6
- 'eslint:recommended',
7
- 'plugin:@typescript-eslint/strict',
8
- 'plugin:@typescript-eslint/stylistic',
9
- // "plugin:@typescript-eslint/strict-type-checked",
10
- // "plugin:@typescript-eslint/stylistic-type-checked",
11
- 'plugin:import/recommended',
12
- 'plugin:import/typescript',
13
- 'plugin:require-extensions/recommended',
14
- ],
15
- env: {
16
- 'shared-node-browser': true,
17
- es2023: true,
18
- },
19
- parser: '@typescript-eslint/parser',
20
- parserOptions: {
21
- project: true,
22
- ecmaVersion: 2023,
23
- sourceType: 'module',
24
- },
25
- plugins: ['@typescript-eslint', 'import', 'require-extensions'],
26
- settings: {
27
- 'import/resolver': {
28
- typescript: {
29
- alwaysTryTypes: true,
30
- ecmaVersion: 2023,
31
- project: ['**/tsconfig.json'],
32
- projectFolderIgnoreList: ['**/node_modules/**'],
33
- },
34
- node: true,
35
- },
36
- 'import/extensions': ['.js', '.mjs', '.ts', '.d.ts'],
37
- },
38
- rules: {
39
- 'max-len': ['error', {code: 140}],
40
- 'no-eval': ['error', {allowIndirect: true}],
41
- 'no-floating-decimal': 'error',
42
- 'space-infix-ops': 'error',
43
- 'new-cap': ['error', {capIsNewExceptionPattern: 'Mixin$'}],
44
- 'brace-style': ['error', 'stroustrup', {allowSingleLine: true}],
45
- indent: 'off',
46
- '@typescript-eslint/indent': [
47
- 'error',
48
- 2,
49
- {
50
- SwitchCase: 1,
51
- VariableDeclarator: 1,
52
- outerIIFEBody: 1,
53
- MemberExpression: 1,
54
- FunctionDeclaration: {parameters: 1, body: 1},
55
- FunctionExpression: {parameters: 1, body: 1},
56
- CallExpression: {arguments: 1},
57
- ArrayExpression: 1,
58
- ObjectExpression: 1,
59
- ImportDeclaration: 1,
60
- flatTernaryExpressions: false,
61
- ignoreComments: false,
62
- ignoredNodes: [
63
- 'TemplateLiteral *',
64
- 'TSTypeParameterInstantiation',
65
- 'FunctionExpression > .params[decorators.length > 0]',
66
- 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
67
- 'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key',
68
- ],
69
- },
70
- ],
71
- 'operator-linebreak': ['error', 'after', {overrides: {'?': 'before', ':': 'before'}}],
72
- 'import/order': [
73
- 'error',
74
- {
75
- groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index'], 'object', 'unknown', 'type'],
76
- 'newlines-between': 'always',
77
- warnOnUnassignedImports: true,
78
- alphabetize: {
79
- order: 'asc',
80
- caseInsensitive: true,
81
- },
82
- },
83
- ],
84
- '@typescript-eslint/prefer-string-starts-ends-with': 'off',
85
- '@typescript-eslint/no-dynamic-delete': 'off',
86
- '@typescript-eslint/no-non-null-assertion': 'off',
87
- '@typescript-eslint/consistent-type-definitions': 'off',
88
- 'no-throw-literal': 'off',
89
- 'no-unused-labels': 'off',
90
- 'require-jsdoc': 'off',
91
- 'valid-jsdoc': 'off',
92
- 'require-await': 'error',
93
- },
94
- };