xo 0.55.0 → 0.56.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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /* eslint-disable unicorn/prefer-top-level-await */
2
+ /* eslint-disable unicorn/prefer-top-level-await -- TODO: Use top-level await */
3
3
  import process from 'node:process';
4
4
  import getStdin from 'get-stdin';
5
5
  import meow from 'meow';
@@ -314,6 +314,8 @@ module.exports = {
314
314
  // TypeScript doesn't yet support using extensions and fails with error TS2691.
315
315
  '.ts': 'never',
316
316
  '.tsx': 'never',
317
+ '.mts': 'never',
318
+ '.cts': 'never',
317
319
  },
318
320
  ],
319
321
  'n/no-mixed-requires': [
package/index.js CHANGED
@@ -89,7 +89,7 @@ const lintFiles = async (patterns, options) => {
89
89
  const {cwd, baseConfig: {ignorePatterns}} = eslintOptions;
90
90
  if (
91
91
  micromatch.isMatch(path.relative(cwd, filePath), ignorePatterns)
92
- // eslint-disable-next-line no-await-in-loop
92
+ // eslint-disable-next-line no-await-in-loop -- Not worth refactoring
93
93
  || await eslint.isPathIgnored(filePath)
94
94
  ) {
95
95
  continue;
package/lib/constants.js CHANGED
@@ -24,6 +24,8 @@ const MERGE_OPTIONS_CONCAT = [
24
24
  const TYPESCRIPT_EXTENSION = [
25
25
  'ts',
26
26
  'tsx',
27
+ 'mts',
28
+ 'cts',
27
29
  ];
28
30
 
29
31
  const DEFAULT_EXTENSION = [
@@ -522,11 +522,11 @@ const findApplicableOverrides = (path, overrides) => {
522
522
  const applicable = [];
523
523
 
524
524
  for (const override of overrides) {
525
- hash <<= 1; // eslint-disable-line no-bitwise
525
+ hash <<= 1; // eslint-disable-line no-bitwise -- Intentional bitwise usage
526
526
 
527
527
  if (micromatch.isMatch(path, override.files)) {
528
528
  applicable.push(override);
529
- hash |= 1; // eslint-disable-line no-bitwise
529
+ hash |= 1; // eslint-disable-line no-bitwise -- Intentional bitwise usage
530
530
  }
531
531
  }
532
532
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xo",
3
- "version": "0.55.0",
3
+ "version": "0.56.0",
4
4
  "description": "JavaScript/TypeScript linter (ESLint wrapper) with great defaults",
5
5
  "license": "MIT",
6
6
  "repository": "xojs/xo",
@@ -67,7 +67,7 @@
67
67
  "eslint-import-resolver-webpack": "^0.13.2",
68
68
  "eslint-plugin-ava": "^14.0.0",
69
69
  "eslint-plugin-eslint-comments": "^3.2.0",
70
- "eslint-plugin-import": "^2.27.5",
70
+ "eslint-plugin-import": "~2.27.5",
71
71
  "eslint-plugin-n": "^16.0.1",
72
72
  "eslint-plugin-no-use-extend-native": "^0.5.0",
73
73
  "eslint-plugin-prettier": "^5.0.0",
package/readme.md CHANGED
@@ -315,7 +315,7 @@ Setting this to an object enables the resolver and passes the object as configur
315
315
 
316
316
  ## TypeScript
317
317
 
318
- XO will automatically lint TypeScript files (`.ts`, `.d.ts` and `.tsx`) with the rules defined in [eslint-config-xo-typescript#use-with-xo](https://github.com/xojs/eslint-config-xo-typescript#use-with-xo).
318
+ XO will automatically lint TypeScript files (`.ts`, `.mts`, `.cts`, `.d.ts` and `.tsx`) with the rules defined in [eslint-config-xo-typescript#use-with-xo](https://github.com/xojs/eslint-config-xo-typescript#use-with-xo).
319
319
 
320
320
  XO will handle the [@typescript-eslint/parser `project` option](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#parseroptionsproject) automatically even if you don't have a `tsconfig.json` in your project.
321
321