diff --git a/packages/eslint-plugin/base.js b/packages/eslint-plugin/base.js index f7a8e5e23..44a5b91d9 100644 --- a/packages/eslint-plugin/base.js +++ b/packages/eslint-plugin/base.js @@ -36,7 +36,7 @@ const config = { }, overrides: [ { - files: ['**/*.ts?(x)'], + files: ['**/*.(m|c)?ts?(x)'], extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', diff --git a/packages/eslint-plugin/typescript.js b/packages/eslint-plugin/typescript.js index 4786f82ae..33369e15c 100644 --- a/packages/eslint-plugin/typescript.js +++ b/packages/eslint-plugin/typescript.js @@ -2,7 +2,7 @@ module.exports = { extends: ['./base.js'], overrides: [ { - files: ['**/*.ts?(x)'], + files: ['**/*.(m|c)?ts?(x)'], parser: '@typescript-eslint/parser', settings: { 'import/resolver': { diff --git a/packages/webpack-config-anansi/src/base/index.js b/packages/webpack-config-anansi/src/base/index.js index 1a3cc5fe6..836324682 100644 --- a/packages/webpack-config-anansi/src/base/index.js +++ b/packages/webpack-config-anansi/src/base/index.js @@ -38,7 +38,7 @@ export default function makeBaseConfig({ const resolve = { modules, // TODO: remove '.js', '.json', '.wasm' once '...' is well supported in plugins like linaria - extensions: ['.ts', '.tsx', '.js', '.json', '.wasm', '...'], + extensions: ['.ts', '.tsx', '.mts', '.cts', '.js', '.json', '.wasm', '...'], fallback: NODE_ALIAS, plugins: tsconfigPathsOptions !== false