@abyssalfragments/linter-config 1.4.2 → 1.5.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/dist/index.d.mts +2 -0
- package/dist/index.mjs +21 -12
- package/dist/plugins/lillith.d.mts +9 -0
- package/dist/plugins/lillith.mjs +12 -0
- package/package.json +10 -9
package/dist/index.d.mts
CHANGED
|
@@ -31,6 +31,7 @@ declare function oxfmt(config?: OxfmtConfig): {
|
|
|
31
31
|
sortPackageJson: true;
|
|
32
32
|
sortTailwindcss: true;
|
|
33
33
|
jsdoc: true;
|
|
34
|
+
endOfLine: "lf";
|
|
34
35
|
};
|
|
35
36
|
type OxlintConfig = SharedConfig & {
|
|
36
37
|
license?: {
|
|
@@ -59,6 +60,7 @@ declare function oxlint(config?: OxlintConfig): {
|
|
|
59
60
|
argsIgnorePattern: string;
|
|
60
61
|
}];
|
|
61
62
|
"unicorn/no-empty-file": "off";
|
|
63
|
+
"lillith/no-lambda-i": "error";
|
|
62
64
|
"no-restricted-imports": ["error", {
|
|
63
65
|
paths: {
|
|
64
66
|
name: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import header_default from "./plugins/header.mjs";
|
|
2
1
|
import js from "@eslint/js";
|
|
3
2
|
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
4
3
|
import unusedImports from "eslint-plugin-unused-imports";
|
|
5
4
|
import { defineConfig, globalIgnores } from "eslint/config";
|
|
6
5
|
import globals from "globals";
|
|
7
6
|
import ts from "typescript-eslint";
|
|
7
|
+
import header_default from "./plugins/header.mjs";
|
|
8
8
|
import { defineConfig as defineConfig$1 } from "oxfmt";
|
|
9
9
|
import { defineConfig as defineConfig$2 } from "oxlint";
|
|
10
10
|
// src/license.ts
|
|
@@ -32,7 +32,7 @@ const sharedIgnores = [
|
|
|
32
32
|
// src/eslint.ts
|
|
33
33
|
const defaultConfig$2 = Object.freeze({});
|
|
34
34
|
function eslint(config = defaultConfig$2) {
|
|
35
|
-
return defineConfig([globalIgnores([...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((
|
|
35
|
+
return defineConfig([globalIgnores([...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((ignore) => `${ignore}/*`)]), {
|
|
36
36
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
|
|
37
37
|
plugins: {
|
|
38
38
|
js,
|
|
@@ -78,7 +78,7 @@ function eslint(config = defaultConfig$2) {
|
|
|
78
78
|
const defaultConfig$1 = Object.freeze({});
|
|
79
79
|
function oxfmt(config = defaultConfig$1) {
|
|
80
80
|
return defineConfig$1({
|
|
81
|
-
ignorePatterns: [...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((
|
|
81
|
+
ignorePatterns: [...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((ignore) => `${ignore}/**/*`)],
|
|
82
82
|
tabWidth: config.rumiMode ? 4 : 2,
|
|
83
83
|
useTabs: config.rumiMode,
|
|
84
84
|
astro: true,
|
|
@@ -86,21 +86,29 @@ function oxfmt(config = defaultConfig$1) {
|
|
|
86
86
|
sortImports: true,
|
|
87
87
|
sortPackageJson: true,
|
|
88
88
|
sortTailwindcss: true,
|
|
89
|
-
jsdoc: true
|
|
89
|
+
jsdoc: true,
|
|
90
|
+
endOfLine: "lf"
|
|
90
91
|
});
|
|
91
92
|
}
|
|
92
93
|
// src/oxlint.ts
|
|
93
94
|
const defaultConfig = Object.freeze({});
|
|
94
95
|
function oxlint(config = defaultConfig) {
|
|
95
96
|
return defineConfig$2({
|
|
96
|
-
ignorePatterns: [...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((
|
|
97
|
-
jsPlugins: [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
ignorePatterns: [...config.extraIgnores ? config.extraIgnores : [], ...sharedIgnores.map((ignore) => `${ignore}/*`)],
|
|
98
|
+
jsPlugins: [
|
|
99
|
+
{
|
|
100
|
+
name: "eslint-js",
|
|
101
|
+
specifier: "oxlint-plugin-eslint"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "lillith",
|
|
105
|
+
specifier: "@abyssalfragments/linter-config/plugins/lillith"
|
|
106
|
+
},
|
|
107
|
+
config.license ? {
|
|
108
|
+
name: "header",
|
|
109
|
+
specifier: "@abyssalfragments/linter-config/plugins/header"
|
|
110
|
+
} : null
|
|
111
|
+
].filter((plugin) => plugin !== null),
|
|
104
112
|
env: config.env ?? {
|
|
105
113
|
node: true,
|
|
106
114
|
es6: true
|
|
@@ -119,6 +127,7 @@ function oxlint(config = defaultConfig) {
|
|
|
119
127
|
argsIgnorePattern: "^_"
|
|
120
128
|
}],
|
|
121
129
|
"unicorn/no-empty-file": "off",
|
|
130
|
+
"lillith/no-lambda-i": "error",
|
|
122
131
|
"no-restricted-imports": ["error", { paths: [{
|
|
123
132
|
name: "discord.js",
|
|
124
133
|
importNames: ["Colors"],
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var lillith_default = {
|
|
2
|
+
meta: { name: "lillith" },
|
|
3
|
+
rules: { "no-lambda-i": { create(context) {
|
|
4
|
+
return { ArrowFunctionExpression(node) {
|
|
5
|
+
if (node.params.some((param) => param.name === "i")) context.report({
|
|
6
|
+
message: "No naming lambda variables 'i'",
|
|
7
|
+
node
|
|
8
|
+
});
|
|
9
|
+
} };
|
|
10
|
+
} } }
|
|
11
|
+
};
|
|
12
|
+
export { lillith_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyssalfragments/linter-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Abyssal Fragments shared linter config (eslint, prettier, etc)",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://git.abyssalfragments.org/packages/linter-config/issues"
|
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
"exports": {
|
|
22
22
|
".": "./dist/index.mjs",
|
|
23
23
|
"./plugins/header": "./dist/plugins/header.mjs",
|
|
24
|
+
"./plugins/lillith": "./dist/plugins/lillith.mjs",
|
|
24
25
|
"./package.json": "./package.json"
|
|
25
26
|
},
|
|
26
27
|
"scripts": {
|
|
27
28
|
"build": "tsdown",
|
|
28
|
-
"dev": "tsdown --watch",
|
|
29
|
+
"dev": "tsdown --watch --sourcemap",
|
|
29
30
|
"check": "tsc --noEmit",
|
|
30
31
|
"prepublishOnly": "npm run build",
|
|
31
32
|
"lint": "oxlint . && oxfmt --check",
|
|
@@ -35,26 +36,26 @@
|
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@eslint/js": "10.0.1",
|
|
38
|
-
"@oxlint/plugins": "^1.
|
|
39
|
+
"@oxlint/plugins": "^1.94.0",
|
|
39
40
|
"eslint-config-prettier": "^10.1.8",
|
|
40
41
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
41
42
|
"globals": "17.14.0",
|
|
42
|
-
"oxlint-plugin-eslint": "^1.
|
|
43
|
-
"typescript-eslint": "8.
|
|
43
|
+
"oxlint-plugin-eslint": "^1.94.0",
|
|
44
|
+
"typescript-eslint": "8.73.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@types/node": "26.6.6",
|
|
47
48
|
"eslint": "10.15.0",
|
|
48
|
-
"oxfmt": "^0.
|
|
49
|
-
"oxlint": "^1.
|
|
49
|
+
"oxfmt": "^0.79.0",
|
|
50
|
+
"oxlint": "^1.94.0",
|
|
50
51
|
"tsdown": "0.23.7",
|
|
51
52
|
"typescript": "6.0.3"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"@astrojs/compiler-rs": "^0.5.0",
|
|
55
56
|
"eslint": "^10.0.0",
|
|
56
|
-
"oxfmt": "
|
|
57
|
-
"oxlint": "
|
|
57
|
+
"oxfmt": ">=0.78.0 <1.0.0",
|
|
58
|
+
"oxlint": ">=1.93.0 <2.0.0",
|
|
58
59
|
"svelte": "^5.0.0"
|
|
59
60
|
},
|
|
60
61
|
"peerDependenciesMeta": {
|