@mado/oxlint 0.3.0 → 0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mado/oxlint
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`a7644fb`](https://github.com/doinki/mado/commit/a7644fb91bdb547d1a5c9148386fc4ab986cfc9e) Thanks [@doinki](https://github.com/doinki)! - The default `@mado/oxlint` configuration now includes the import preset. It reports runtime import cycles as errors and allows cycles formed only by type imports.
8
+
9
+ The preset warns about duplicate imports, imports placed after other statements, missing blank lines after imports, and empty named import blocks. It prefers top-level `import type` declarations, grouped named exports, named values for default exports, and default imports written as `import value from './module'`. Duplicate import checks treat different query strings as distinct module requests.
10
+
11
+ - [`f7826d4`](https://github.com/doinki/mado/commit/f7826d4860895d8b6ecf19a3f48c1802a8d5aa03) Thanks [@doinki](https://github.com/doinki)! - The default `@mado/oxlint` configuration now includes the Node.js and Promise presets.
12
+
13
+ The Node.js preset reports errors for reassigning `exports` or calling `new` on `require`. It warns about ignored callback errors, callback calls that may let execution continue, use of `exports` in place of `module.exports`, and paths built by concatenating strings with `__dirname` or `__filename`.
14
+
15
+ ## 0.4.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`9a26b93`](https://github.com/doinki/mado/commit/9a26b93eceefaf05a19f7932913b8927685e4577) Thanks [@doinki](https://github.com/doinki)! - The `@mado/oxlint/promise` preset now reports errors when the same execution path calls `resolve` or `reject` more than once, when `new` is used on a static Promise method, or when a Promise method receives the wrong number of arguments.
20
+
21
+ The preset also warns about missing returns in `.then()` callbacks, chains that are neither caught nor returned, callbacks invoked inside Promise handlers, redundant `Promise.resolve()` or `Promise.reject()` wrappers, and nonstandard Promise executor parameter names. A final `.then()` callback may omit its return when the chain's result is unused.
22
+
3
23
  ## 0.3.0
4
24
 
5
25
  ### Minor Changes
package/dist/import.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const rules={"import/consistent-type-specifier-style":"off","import/default":"off","import/export":"off","import/exports-last":"off","import/extensions":"off","import/first":"off","import/group-exports":"off","import/max-dependencies":"off","import/named":"off","import/namespace":"off","import/newline-after-import":"off","import/no-absolute-path":"off","import/no-amd":"off","import/no-anonymous-default-export":"off","import/no-commonjs":"off","import/no-cycle":"off","import/no-default-export":"off","import/no-duplicates":"off","import/no-dynamic-require":"off","import/no-empty-named-blocks":"off","import/no-mutable-exports":"off","import/no-named-as-default":"off","import/no-named-as-default-member":"off","import/no-named-default":"off","import/no-named-export":"off","import/no-namespace":"off","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-self-import":"off","import/no-unassigned-import":"off","import/no-webpack-loader-syntax":"off","import/prefer-default-export":"off","import/unambiguous":"off"};var _import={plugins:["import"],rules:rules};exports.default=_import;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});const rules={"import/consistent-type-specifier-style":"warn","import/default":"off","import/export":"off","import/exports-last":"off","import/extensions":"off","import/first":"warn","import/group-exports":"warn","import/max-dependencies":"off","import/named":"off","import/namespace":"off","import/newline-after-import":"warn","import/no-absolute-path":"off","import/no-amd":"off","import/no-anonymous-default-export":"warn","import/no-commonjs":"off","import/no-cycle":"error","import/no-default-export":"off","import/no-duplicates":["warn",{considerQueryString:true}],"import/no-dynamic-require":"off","import/no-empty-named-blocks":"warn","import/no-mutable-exports":"off","import/no-named-as-default":"off","import/no-named-as-default-member":"off","import/no-named-default":"warn","import/no-named-export":"off","import/no-namespace":"off","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-self-import":"off","import/no-unassigned-import":"off","import/no-webpack-loader-syntax":"off","import/prefer-default-export":"off","import/unambiguous":"off"};var imports={plugins:["import"],rules:rules};exports.default=imports;
package/dist/import.js CHANGED
@@ -1 +1 @@
1
- const rules={"import/consistent-type-specifier-style":"off","import/default":"off","import/export":"off","import/exports-last":"off","import/extensions":"off","import/first":"off","import/group-exports":"off","import/max-dependencies":"off","import/named":"off","import/namespace":"off","import/newline-after-import":"off","import/no-absolute-path":"off","import/no-amd":"off","import/no-anonymous-default-export":"off","import/no-commonjs":"off","import/no-cycle":"off","import/no-default-export":"off","import/no-duplicates":"off","import/no-dynamic-require":"off","import/no-empty-named-blocks":"off","import/no-mutable-exports":"off","import/no-named-as-default":"off","import/no-named-as-default-member":"off","import/no-named-default":"off","import/no-named-export":"off","import/no-namespace":"off","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-self-import":"off","import/no-unassigned-import":"off","import/no-webpack-loader-syntax":"off","import/prefer-default-export":"off","import/unambiguous":"off"};var _import={plugins:["import"],rules:rules};export{_import as default};
1
+ const rules={"import/consistent-type-specifier-style":"warn","import/default":"off","import/export":"off","import/exports-last":"off","import/extensions":"off","import/first":"warn","import/group-exports":"warn","import/max-dependencies":"off","import/named":"off","import/namespace":"off","import/newline-after-import":"warn","import/no-absolute-path":"off","import/no-amd":"off","import/no-anonymous-default-export":"warn","import/no-commonjs":"off","import/no-cycle":"error","import/no-default-export":"off","import/no-duplicates":["warn",{considerQueryString:true}],"import/no-dynamic-require":"off","import/no-empty-named-blocks":"warn","import/no-mutable-exports":"off","import/no-named-as-default":"off","import/no-named-as-default-member":"off","import/no-named-default":"warn","import/no-named-export":"off","import/no-namespace":"off","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-self-import":"off","import/no-unassigned-import":"off","import/no-webpack-loader-syntax":"off","import/prefer-default-export":"off","import/unambiguous":"off"};var imports={plugins:["import"],rules:rules};export{imports as default};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});var oxc=require("./oxc.cjs");const config={extends:[oxc.default],jsPlugins:["eslint-plugin-perfectionist","eslint-plugin-simple-import-sort","eslint-plugin-trim"],rules:{"perfectionist/sort-heritage-clauses":"warn","perfectionist/sort-interfaces":"warn","perfectionist/sort-intersection-types":"warn","perfectionist/sort-object-types":"warn","perfectionist/sort-objects":"warn","perfectionist/sort-switch-case":"warn","perfectionist/sort-union-types":"warn","simple-import-sort/exports":"warn","simple-import-sort/imports":"warn","trim/argument":"warn","trim/class-name":"warn"}};exports.default=config;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var _import=require("./import.cjs");var node=require("./node.cjs");var oxc=require("./oxc.cjs");var promise=require("./promise.cjs");const config={extends:[_import.default,node.default,oxc.default,promise.default],jsPlugins:["eslint-plugin-perfectionist","eslint-plugin-simple-import-sort","eslint-plugin-trim"],rules:{"perfectionist/sort-heritage-clauses":"warn","perfectionist/sort-interfaces":"warn","perfectionist/sort-intersection-types":"warn","perfectionist/sort-object-types":"warn","perfectionist/sort-objects":"warn","perfectionist/sort-switch-case":"warn","perfectionist/sort-union-types":"warn","simple-import-sort/exports":"warn","simple-import-sort/imports":"warn","trim/argument":"warn","trim/class-name":"warn"}};exports.default=config;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import oxc from"./oxc.js";const config={extends:[oxc],jsPlugins:["eslint-plugin-perfectionist","eslint-plugin-simple-import-sort","eslint-plugin-trim"],rules:{"perfectionist/sort-heritage-clauses":"warn","perfectionist/sort-interfaces":"warn","perfectionist/sort-intersection-types":"warn","perfectionist/sort-object-types":"warn","perfectionist/sort-objects":"warn","perfectionist/sort-switch-case":"warn","perfectionist/sort-union-types":"warn","simple-import-sort/exports":"warn","simple-import-sort/imports":"warn","trim/argument":"warn","trim/class-name":"warn"}};export{config as default};
1
+ import imports from"./import.js";import node from"./node.js";import oxc from"./oxc.js";import promise from"./promise.js";const config={extends:[imports,node,oxc,promise],jsPlugins:["eslint-plugin-perfectionist","eslint-plugin-simple-import-sort","eslint-plugin-trim"],rules:{"perfectionist/sort-heritage-clauses":"warn","perfectionist/sort-interfaces":"warn","perfectionist/sort-intersection-types":"warn","perfectionist/sort-object-types":"warn","perfectionist/sort-objects":"warn","perfectionist/sort-switch-case":"warn","perfectionist/sort-union-types":"warn","simple-import-sort/exports":"warn","simple-import-sort/imports":"warn","trim/argument":"warn","trim/class-name":"warn"}};export{config as default};
package/dist/node.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const rules={"node/callback-return":"off","node/exports-style":"off","node/global-require":"off","node/handle-callback-err":"off","node/no-exports-assign":"off","node/no-mixed-requires":"off","node/no-new-require":"off","node/no-path-concat":"off","node/no-process-env":"off","node/no-sync":"off","node/no-top-level-await":"off"};var node={plugins:["node"],rules:rules};exports.default=node;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});const rules={"node/callback-return":"warn","node/exports-style":"warn","node/global-require":"off","node/handle-callback-err":["warn","^(err|error)$"],"node/no-exports-assign":"error","node/no-mixed-requires":"off","node/no-new-require":"error","node/no-path-concat":"warn","node/no-process-env":"off","node/no-sync":"off","node/no-top-level-await":"off"};var node={plugins:["node"],rules:rules};exports.default=node;
package/dist/node.js CHANGED
@@ -1 +1 @@
1
- const rules={"node/callback-return":"off","node/exports-style":"off","node/global-require":"off","node/handle-callback-err":"off","node/no-exports-assign":"off","node/no-mixed-requires":"off","node/no-new-require":"off","node/no-path-concat":"off","node/no-process-env":"off","node/no-sync":"off","node/no-top-level-await":"off"};var node={plugins:["node"],rules:rules};export{node as default};
1
+ const rules={"node/callback-return":"warn","node/exports-style":"warn","node/global-require":"off","node/handle-callback-err":["warn","^(err|error)$"],"node/no-exports-assign":"error","node/no-mixed-requires":"off","node/no-new-require":"error","node/no-path-concat":"warn","node/no-process-env":"off","node/no-sync":"off","node/no-top-level-await":"off"};var node={plugins:["node"],rules:rules};export{node as default};
package/dist/promise.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const rules={"promise/always-return":"off","promise/avoid-new":"off","promise/catch-or-return":"off","promise/no-callback-in-promise":"off","promise/no-multiple-resolved":"off","promise/no-nesting":"off","promise/no-new-statics":"off","promise/no-promise-in-callback":"off","promise/no-return-in-finally":"off","promise/no-return-wrap":"off","promise/param-names":"off","promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off","promise/prefer-catch":"off","promise/spec-only":"off","promise/valid-params":"off"};var promise={plugins:["promise"],rules:rules};exports.default=promise;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});const rules={"promise/always-return":["warn",{ignoreLastCallback:true}],"promise/avoid-new":"off","promise/catch-or-return":"warn","promise/no-callback-in-promise":"warn","promise/no-multiple-resolved":"error","promise/no-nesting":"off","promise/no-new-statics":"error","promise/no-promise-in-callback":"off","promise/no-return-in-finally":"off","promise/no-return-wrap":"warn","promise/param-names":"warn","promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off","promise/prefer-catch":"off","promise/spec-only":"off","promise/valid-params":"error"};var promise={plugins:["promise"],rules:rules};exports.default=promise;
package/dist/promise.js CHANGED
@@ -1 +1 @@
1
- const rules={"promise/always-return":"off","promise/avoid-new":"off","promise/catch-or-return":"off","promise/no-callback-in-promise":"off","promise/no-multiple-resolved":"off","promise/no-nesting":"off","promise/no-new-statics":"off","promise/no-promise-in-callback":"off","promise/no-return-in-finally":"off","promise/no-return-wrap":"off","promise/param-names":"off","promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off","promise/prefer-catch":"off","promise/spec-only":"off","promise/valid-params":"off"};var promise={plugins:["promise"],rules:rules};export{promise as default};
1
+ const rules={"promise/always-return":["warn",{ignoreLastCallback:true}],"promise/avoid-new":"off","promise/catch-or-return":"warn","promise/no-callback-in-promise":"warn","promise/no-multiple-resolved":"error","promise/no-nesting":"off","promise/no-new-statics":"error","promise/no-promise-in-callback":"off","promise/no-return-in-finally":"off","promise/no-return-wrap":"warn","promise/param-names":"warn","promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off","promise/prefer-catch":"off","promise/spec-only":"off","promise/valid-params":"error"};var promise={plugins:["promise"],rules:rules};export{promise as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mado/oxlint",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Shared Oxlint configuration",
5
5
  "keywords": [
6
6
  "config",