-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed default ecmaVersion to "latest"
- Loading branch information
Showing
8 changed files
with
44 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
import { getEcmaVersionIfUseEspree, getEspree } from "../common/espree" | ||
import type { ParserOptions } from "../common/parser-options" | ||
export const DEFAULT_ECMA_VERSION = "latest" | ||
|
||
export const DEFAULT_ECMA_VERSION = 2017 | ||
|
||
/** | ||
* Get parser options for <script setup> | ||
*/ | ||
export function getScriptSetupParserOptions( | ||
parserOptions: ParserOptions, | ||
): ParserOptions { | ||
const espreeEcmaVersion = getEcmaVersionIfUseEspree( | ||
parserOptions, | ||
getDefaultEcmaVersion, | ||
) | ||
|
||
return { | ||
...parserOptions, | ||
ecmaVersion: espreeEcmaVersion, | ||
} | ||
} | ||
|
||
function getDefaultEcmaVersion() { | ||
return getEspree().latestEcmaVersion | ||
} | ||
export const ANALYZE_SCOPE_DEFAULT_ECMA_VERSION = 2022 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters