Skip to content

Commit a06fe4c

Browse files
fix: add parser option for cjs,mjs,cts,mts (#49)
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
1 parent a419fd4 commit a06fe4c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ module.exports = {
99
parser: {
1010
'js': 'espree',
1111
'jsx': 'espree',
12+
'cjs': 'espree',
13+
'mjs': 'espree',
1214

1315
'ts': require.resolve('@typescript-eslint/parser'),
1416
'tsx': require.resolve('@typescript-eslint/parser'),
17+
'cts': require.resolve('@typescript-eslint/parser'),
18+
'mts': require.resolve('@typescript-eslint/parser'),
1519

1620
// Leave the template parser unspecified, so that it could be determined by `<script lang="...">`
1721
},
@@ -27,7 +31,7 @@ module.exports = {
2731

2832
overrides: [
2933
{
30-
files: ['*.ts', '*.tsx', '*.vue'],
34+
files: ['*.ts', '*.cts', '*.mts', '*.tsx', '*.vue'],
3135
rules: {
3236
// The core 'no-unused-vars' rules (in the eslint:recommeded ruleset)
3337
// does not work with type definitions

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy