@nexim/eslint-config 2.1.0 → 2.1.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 +4 -0
- package/dist/lib/typescript-config.d.ts.map +1 -1
- package/dist/main.mjs +1 -1
- package/dist/main.mjs.map +2 -2
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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.1.1](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@2.1.0...@nexim/eslint-config@2.1.1) (2025-08-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nexim/eslint-config
|
|
9
|
+
|
|
6
10
|
## [2.1.0](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@2.0.1...@nexim/eslint-config@2.1.0) (2025-04-27)
|
|
7
11
|
|
|
8
12
|
### Features
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-config.d.ts","sourceRoot":"","sources":["../../src/lib/typescript-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typescript-config.d.ts","sourceRoot":"","sources":["../../src/lib/typescript-config.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,QAAQ,qEAwHnB,CAAC"}
|
package/dist/main.mjs
CHANGED
package/dist/main.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/lib/typescript-config.ts", "../src/lib/javascript-config.ts", "../src/lib/extended-config.ts"],
|
|
4
|
-
"sourcesContent": ["import stylistic from '@stylistic/eslint-plugin';\
|
|
5
|
-
"mappings": ";;;AAAA,OAAO,eAAe;
|
|
4
|
+
"sourcesContent": ["import stylistic from '@stylistic/eslint-plugin';\nimport importPlugin from 'eslint-plugin-import';\nimport tsdocPlugin from 'eslint-plugin-tsdoc';\nimport * as globals from 'globals';\nimport { plugin, parser, config } from 'typescript-eslint';\n\nconst tsconfigRootDir = import.meta.dirname;\n\nexport const tsConfig = config({\n files: [ '**/*.{ts,tsx}' ],\n languageOptions: {\n globals: {\n ...globals['shared-node-browser'],\n },\n ecmaVersion: 'latest',\n sourceType: 'module',\n parser: parser,\n parserOptions: {\n projectService: true,\n tsconfigRootDir,\n },\n },\n\n extends: [ importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript ],\n plugins: {\n '@typescript-eslint': 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', // no .5 or 2., use 0.5 or 2.0\n '@stylistic/space-infix-ops': 'error',\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\n 'no-unused-labels': 'off',\n 'require-await': 'error',\n\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/no-non-null-assertion': 'off',\n\n // picked and customized from `stylistic-type-checked`\n '@typescript-eslint/consistent-type-definitions': 'off', // prefer interface over type\n '@typescript-eslint/ban-ts-comment': [ 'error' ], // no @ts-ignore without description\n '@typescript-eslint/no-deprecated': 'error', // catches usage of @deprecated items\n '@typescript-eslint/no-duplicate-type-constituents': 'error', // bad: type T = 'a' | 'a'\n '@typescript-eslint/no-explicit-any': 'error', // bad: const x: any\n '@typescript-eslint/no-extra-non-null-assertion': 'error', // bad: foo!!.bar\n 'no-implied-eval': 'off',\n '@typescript-eslint/no-invalid-void-type': 'error', // bad: type T = void | string\n '@typescript-eslint/no-misused-spread': 'error', // bad: [...new Set([])]\n '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error', // bad: foo! ?? bar\n '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', // bad: foo?.bar!\n '@typescript-eslint/no-redundant-type-constituents': 'error', // bad: type T = string | 'a'\n '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error', // bad: bool === true\n '@typescript-eslint/no-unnecessary-template-expression': 'error', // bad: `${5}`\n '@typescript-eslint/no-unnecessary-type-arguments': 'error', // bad: Map<string> when string is default\n '@typescript-eslint/no-unnecessary-type-assertion': 'error', // bad: x as string when x is string\n '@typescript-eslint/no-unnecessary-type-constraint': 'error', // bad: <T extends any>\n 'no-unused-expressions': 'off',\n '@typescript-eslint/no-unused-expressions': 'error', // bad: x + y;\n 'no-useless-constructor': 'off',\n '@typescript-eslint/no-useless-constructor': 'error', // bad: constructor() {}\n '@typescript-eslint/no-wrapper-object-types': 'error', // bad: String, use string\n 'no-throw-literal': 'off',\n '@typescript-eslint/only-throw-error': 'error', // bad: throw \"error\"\n '@typescript-eslint/prefer-as-const': 'error', // bad: let x: 'foo' = 'foo'\n 'prefer-promise-reject-errors': 'off',\n '@typescript-eslint/prefer-promise-reject-errors': 'error', // bad: reject('error')\n '@typescript-eslint/prefer-reduce-type-parameter': 'error', // use <T> reduce over type assertions\n '@typescript-eslint/require-await': 'error', // async must use await\n\n 'import/order': [\n 'error',\n {\n groups: [ 'builtin', 'external', 'internal', [ 'parent', 'sibling', 'index' ], 'object', 'unknown', 'type' ],\n 'newlines-between': 'always',\n warnOnUnassignedImports: true,\n alphabetize: {\n order: 'asc',\n caseInsensitive: true,\n },\n },\n ],\n },\n settings: {\n 'import/resolver': {\n typescript: {\n alwaysTryTypes: true,\n project: [ tsconfigRootDir ],\n },\n node: {},\n },\n },\n});\n", "import tsdocPlugin from 'eslint-plugin-tsdoc';\nimport * as globals from 'globals';\nimport { plugin, configs, config } from 'typescript-eslint';\n\nexport const jsConfigs = config({\n extends: [ configs.disableTypeChecked ],\n files: [ '**/*.{mjs,js,cjs}' ],\n plugins: {\n '@typescript-eslint': plugin,\n tsdoc: tsdocPlugin,\n },\n languageOptions: {\n globals: {\n ...globals.commonjs,\n ...globals.node,\n console: 'readonly', // TODO: why is this not in globals?\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", "/* eslint-disable import/no-named-as-default-member */\n\nimport eslint from '@eslint/js';\nimport tslint from 'typescript-eslint';\n\nexport const baseExtends = tslint.config(eslint.configs.recommended, tslint.configs.stylisticTypeChecked, tslint.configs.strict);\n"],
|
|
5
|
+
"mappings": ";;;AAAA,OAAO,eAAe;AACtB,OAAO,kBAAkB;AACzB,OAAO,iBAAiB;AACxB,YAAY,aAAa;AACzB,SAAS,QAAQ,QAAQ,cAAc;AAEvC,IAAM,kBAAkB,YAAY;AAE7B,IAAM,WAAW,OAAO;AAAA,EAC7B,OAAO,CAAE,eAAgB;AAAA,EACzB,iBAAiB;AAAA,IACf,SAAS;AAAA,MACP,GAAW;AAAA,IACb;AAAA,IACA,aAAa;AAAA,IACb,YAAY;AA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ChID,OAAOA,kBAAiB;AACxB,YAAYC,cAAa;AACzB,SAAS,UAAAC,SAAQ,SAAS,UAAAC,eAAc;AAEjC,IAAM,YAAYA,QAAO;AAAA,EAC9B,SAAS,CAAE,QAAQ,kBAAmB;AAAA,EACtC,OAAO,CAAE,mBAAoB;AAAA,EAC7B,SAAS;AAAA,IACP,sBAAsBD;AAAA,IACtB,OAAOF;AAAA,EACT;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,MACP,GAAW;AAAA,MACX,GAAW;AAAA,MACX,SAAS;AAAA;AAAA,IACX;AAAA,IACA,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,yCAAyC;AAAA,IACzC,qDAAqD;AAAA,IACrD,gBAAgB;AAAA,EAClB;AACF,CAAC;;;ACtBD,OAAO,YAAY;AACnB,OAAO,YAAY;AAEZ,IAAM,cAAc,OAAO,OAAO,OAAO,QAAQ,aAAa,OAAO,QAAQ,sBAAsB,OAAO,QAAQ,MAAM;",
|
|
6
6
|
"names": ["tsdocPlugin", "globals", "plugin", "config"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexim/eslint-config",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Base Eslint configuration for Nexim projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -56,24 +56,24 @@
|
|
|
56
56
|
"watch": "wireit"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@eslint/compat": "^1.2
|
|
60
|
-
"@eslint/js": "^9.
|
|
61
|
-
"@stylistic/eslint-plugin": "^
|
|
62
|
-
"@typescript-eslint/parser": "^8.
|
|
63
|
-
"eslint": "^9.
|
|
64
|
-
"eslint-import-resolver-typescript": "^4.
|
|
65
|
-
"eslint-plugin-import": "^2.
|
|
59
|
+
"@eslint/compat": "^1.3.2",
|
|
60
|
+
"@eslint/js": "^9.33.0",
|
|
61
|
+
"@stylistic/eslint-plugin": "^5.2.3",
|
|
62
|
+
"@typescript-eslint/parser": "^8.39.1",
|
|
63
|
+
"eslint": "^9.33.0",
|
|
64
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
65
|
+
"eslint-plugin-import": "^2.32.0",
|
|
66
66
|
"eslint-plugin-tsdoc": "^0.4.0",
|
|
67
|
-
"globals": "^16.
|
|
68
|
-
"typescript-eslint": "^8.
|
|
67
|
+
"globals": "^16.3.0",
|
|
68
|
+
"typescript-eslint": "^8.39.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@alwatr/nano-build": "^5.5.3",
|
|
72
72
|
"@alwatr/type-helper": "^5.4.1",
|
|
73
73
|
"@nexim/typescript-config": "^2.0.1",
|
|
74
74
|
"@types/eslint": "^9.6.1",
|
|
75
|
-
"@types/node": "^
|
|
76
|
-
"typescript": "^5.
|
|
75
|
+
"@types/node": "^24.2.1",
|
|
76
|
+
"typescript": "^5.9.2",
|
|
77
77
|
"wireit": "^0.14.12"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"service": true
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "e67fe3938015270ff3bb71c5d76334faebc4c142"
|
|
129
129
|
}
|