@nexim/eslint-config 2.1.4 → 2.1.5
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 +6 -0
- package/dist/lib/extended-config.d.ts +1 -1
- package/dist/lib/extended-config.d.ts.map +1 -1
- package/dist/lib/javascript-config.d.ts +1 -1
- package/dist/lib/javascript-config.d.ts.map +1 -1
- package/dist/lib/typescript-config.d.ts +1 -1
- package/dist/lib/typescript-config.d.ts.map +1 -1
- package/dist/main.mjs +3 -3
- package/dist/main.mjs.map +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.5](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@2.1.4...@nexim/eslint-config@2.1.5) (2025-11-22)
|
|
7
|
+
|
|
8
|
+
### Code Refactoring
|
|
9
|
+
|
|
10
|
+
* **eslint-config:** replace config function with defineConfig based config deprecation ([12ddb9a](https://github.com/the-nexim/nanolib/commit/12ddb9af84d32b5bf4c84cac731adf87668be061)) by @njfamirm
|
|
11
|
+
|
|
6
12
|
## [2.1.4](https://github.com/the-nexim/nanolib/compare/@nexim/eslint-config@2.1.3...@nexim/eslint-config@2.1.4) (2025-11-22)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const baseExtends: import("
|
|
1
|
+
export declare const baseExtends: import("eslint/config").Config[];
|
|
2
2
|
//# sourceMappingURL=extended-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extended-config.d.ts","sourceRoot":"","sources":["../../src/lib/extended-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"extended-config.d.ts","sourceRoot":"","sources":["../../src/lib/extended-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,kCAAuG,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const jsConfigs: import("
|
|
1
|
+
export declare const jsConfigs: import("eslint/config").Config[];
|
|
2
2
|
//# sourceMappingURL=javascript-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript-config.d.ts","sourceRoot":"","sources":["../../src/lib/javascript-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"javascript-config.d.ts","sourceRoot":"","sources":["../../src/lib/javascript-config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,kCAoBpB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const tsConfig: import("
|
|
1
|
+
export declare const tsConfig: import("eslint/config").Config[];
|
|
2
2
|
//# sourceMappingURL=typescript-config.d.ts.map
|
|
@@ -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":"AASA,eAAO,MAAM,QAAQ,kCAwHnB,CAAC"}
|
package/dist/main.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** 📦 @nexim/eslint-config v2.1.
|
|
2
|
-
__dev_mode__: console.debug("📦 @nexim/eslint-config v2.1.
|
|
3
|
-
import stylistic from"@stylistic/eslint-plugin";import importPlugin from"eslint-plugin-import";import tsdocPlugin from"eslint-plugin-tsdoc";import*as globals from"globals";import{plugin,parser
|
|
1
|
+
/** 📦 @nexim/eslint-config v2.1.5 */
|
|
2
|
+
__dev_mode__: console.debug("📦 @nexim/eslint-config v2.1.5");
|
|
3
|
+
import stylistic from"@stylistic/eslint-plugin";import{defineConfig}from"eslint/config";import importPlugin from"eslint-plugin-import";import tsdocPlugin from"eslint-plugin-tsdoc";import*as globals from"globals";import{plugin,parser}from"typescript-eslint";var tsconfigRootDir=import.meta.dirname;var tsConfig=defineConfig({files:["**/*.{ts,tsx}"],languageOptions:{globals:{...globals["shared-node-browser"]},ecmaVersion:"latest",sourceType:"module",parser,parserOptions:{projectService:true,tsconfigRootDir}},extends:[importPlugin.flatConfigs.recommended,importPlugin.flatConfigs.typescript],plugins:{"@typescript-eslint":plugin,"@stylistic":stylistic,tsdoc:tsdocPlugin},rules:{"@stylistic/max-len":["error",{code:140}],"no-eval":["error",{allowIndirect:true}],"@stylistic/no-floating-decimal":"error","@stylistic/space-infix-ops":"error","@stylistic/brace-style":["error","stroustrup",{allowSingleLine:true}],"@stylistic/array-bracket-spacing":["error","always"],"@stylistic/indent":["error",2,{SwitchCase:1,VariableDeclarator:1,outerIIFEBody:1,MemberExpression:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},CallExpression:{arguments:1},ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:false,ignoreComments:false,ignoredNodes:["TemplateLiteral *","TSTypeParameterInstantiation","FunctionExpression > .params[decorators.length > 0]","FunctionExpression > .params > :matches(Decorator, :not(:first-child))","ClassBody.body > PropertyDefinition[decorators.length > 0] > .key"]}],"@stylistic/operator-linebreak":["error","after",{overrides:{"?":"before",":":"before"}}],"@stylistic/semi":"error","tsdoc/syntax":"warn","no-unused-vars":"off","prefer-const":"error","no-unused-labels":"off","require-await":"error","@typescript-eslint/no-dynamic-delete":"off","@typescript-eslint/no-non-null-assertion":"off","@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/ban-ts-comment":["error"],"@typescript-eslint/no-deprecated":"error","@typescript-eslint/no-duplicate-type-constituents":"error","@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-extra-non-null-assertion":"error","no-implied-eval":"off","@typescript-eslint/no-invalid-void-type":"error","@typescript-eslint/no-misused-spread":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-redundant-type-constituents":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-template-expression":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":"error","no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-wrapper-object-types":"error","no-throw-literal":"off","@typescript-eslint/only-throw-error":"error","@typescript-eslint/prefer-as-const":"error","prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/require-await":"error","import/order":["error",{groups:["builtin","external","internal",["parent","sibling","index"],"object","unknown","type"],"newlines-between":"always",warnOnUnassignedImports:true,alphabetize:{order:"asc",caseInsensitive:true}}]},settings:{"import/resolver":{typescript:{alwaysTryTypes:true,project:[tsconfigRootDir]},node:{}}}});import{defineConfig as defineConfig2}from"eslint/config";import tsdocPlugin2 from"eslint-plugin-tsdoc";import*as globals2 from"globals";import{plugin as plugin2,configs}from"typescript-eslint";var jsConfigs=defineConfig2({extends:[configs.disableTypeChecked],files:["**/*.{mjs,js,cjs}"],plugins:{"@typescript-eslint":plugin2,tsdoc:tsdocPlugin2},languageOptions:{globals:{...globals2.commonjs,...globals2.node,console:"readonly"},sourceType:"commonjs"},rules:{"@typescript-eslint/no-require-imports":"off","@typescript-eslint/explicit-module-boundary-types":"off","tsdoc/syntax":"off"}});import eslint from"@eslint/js";import{defineConfig as defineConfig3}from"eslint/config";import tslint from"typescript-eslint";var baseExtends=defineConfig3(eslint.configs.recommended,tslint.configs.stylisticTypeChecked,tslint.configs.strict);export{baseExtends,jsConfigs,tsConfig};
|
|
4
4
|
//# sourceMappingURL=main.mjs.map
|
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';\nimport importPlugin from 'eslint-plugin-import';\nimport tsdocPlugin from 'eslint-plugin-tsdoc';\nimport * as globals from 'globals';\nimport { plugin, parser
|
|
5
|
-
"mappings": ";;AAAA,OAAO,cAAe,2BACtB,OAAO,iBAAkB,uBACzB,OAAO,gBAAiB,sBACxB,UAAY,YAAa,UACzB,OAAS,OAAQ,
|
|
6
|
-
"names": ["tsdocPlugin", "globals", "plugin", "
|
|
4
|
+
"sourcesContent": ["import stylistic from '@stylistic/eslint-plugin';\nimport { defineConfig } from 'eslint/config';\nimport importPlugin from 'eslint-plugin-import';\nimport tsdocPlugin from 'eslint-plugin-tsdoc';\nimport * as globals from 'globals';\nimport { plugin, parser } from 'typescript-eslint';\n\nconst tsconfigRootDir = import.meta.dirname;\n\nexport const tsConfig = defineConfig({\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 { defineConfig } from 'eslint/config';\nimport tsdocPlugin from 'eslint-plugin-tsdoc';\nimport * as globals from 'globals';\nimport { plugin, configs } from 'typescript-eslint';\n\nexport const jsConfigs = defineConfig({\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 { defineConfig } from 'eslint/config';\nimport tslint from 'typescript-eslint';\nexport const baseExtends = defineConfig(eslint.configs.recommended, tslint.configs.stylisticTypeChecked, tslint.configs.strict);\n"],
|
|
5
|
+
"mappings": ";;AAAA,OAAO,cAAe,2BACtB,OAAS,iBAAoB,gBAC7B,OAAO,iBAAkB,uBACzB,OAAO,gBAAiB,sBACxB,UAAY,YAAa,UACzB,OAAS,OAAQ,WAAc,oBAE/B,IAAM,gBAAkB,YAAY,QAE7B,IAAM,SAAW,aAAa,CACnC,MAAO,CAAE,eAAgB,EACzB,gBAAiB,CACf,QAAS,CACP,GAAW,8BACb,EACA,YAAa,SACb,WAAY,SACZ,OACA,cAAe,CACb,eAAgB,KAChB,eACF,CACF,EAEA,QAAS,CAAE,aAAa,YAAY,YAAa,aAAa,YAAY,UAAW,EACrF,QAAS,CACP,qBAAsB,OACtB,aAAc,UACd,MAAO,WACT,EACA,MAAO,CACL,qBAAsB,CAAE,QAAS,CAAE,KAAM,GAAI,CAAE,EAC/C,UAAW,CAAE,QAAS,CAAE,cAAe,IAAK,CAAE,EAC9C,iCAAkC,QAClC,6BAA8B,QAC9B,yBAA0B,CAAE,QAAS,aAAc,CAAE,gBAAiB,IAAK,CAAE,EAC7E,mCAAoC,CAAE,QAAS,QAAS,EACxD,oBAAqB,CACnB,QACA,EACA,CACE,WAAY,EACZ,mBAAoB,EACpB,cAAe,EACf,iBAAkB,EAClB,oBAAqB,CAAE,WAAY,EAAG,KAAM,CAAE,EAC9C,mBAAoB,CAAE,WAAY,EAAG,KAAM,CAAE,EAC7C,eAAgB,CAAE,UAAW,CAAE,EAC/B,gBAAiB,EACjB,iBAAkB,EAClB,kBAAmB,EACnB,uBAAwB,MACxB,e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ACP,qBAAsBG,QACtB,MAAOF,YACT,EACA,gBAAiB,CACf,QAAS,CACP,GAAW,kBACX,GAAW,cACX,QAAS,UACX,EACA,WAAY,UACd,EACA,MAAO,CACL,wCAAyC,MACzC,oDAAqD,MACrD,eAAgB,KAClB,CACF,CAAC,ECvBD,OAAO,WAAY,aACnB,OAAS,gBAAAG,kBAAoB,gBAC7B,OAAO,WAAY,oBACZ,IAAM,YAAcA,cAAa,OAAO,QAAQ,YAAa,OAAO,QAAQ,qBAAsB,OAAO,QAAQ,MAAM",
|
|
6
|
+
"names": ["defineConfig", "tsdocPlugin", "globals", "plugin", "defineConfig"]
|
|
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.5",
|
|
4
4
|
"description": "Base Eslint configuration for Nexim projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"service": true
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "33b0d323d0e03613da7c9057620e74ddae7c8b22"
|
|
129
129
|
}
|