@abyssalfragments/linter-config 1.4.2 → 1.5.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.
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
@@ -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((i) => `${i}/*`)]), {
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((i) => `${i}/**/*`)],
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((i) => `${i}/*`)],
97
- jsPlugins: [{
98
- name: "eslint-js",
99
- specifier: "oxlint-plugin-eslint"
100
- }, config.license ? {
101
- name: "header",
102
- specifier: "@abyssalfragments/linter-config/plugins/header"
103
- } : null].filter((i) => i !== null),
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,9 @@
1
+ import { ESLint } from "eslint";
2
+ type RuleDefinition = NonNullable<ESLint.Plugin["rules"]>[string];
3
+ declare const _default: {
4
+ meta: {
5
+ name: string;
6
+ };
7
+ rules: Record<string, RuleDefinition>;
8
+ };
9
+ export { _default as default };
@@ -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.4.2",
3
+ "version": "1.5.0",
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",