Created
May 31, 2025 06:13
-
-
Save JenHsuan/205647f46b9f4903fcc1bbabca836dcb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ... | |
| import stylisticTs from '@stylistic/eslint-plugin-ts'; | |
| import stylisticJs from '@stylistic/eslint-plugin-js'; | |
| import stylisticJsx from '@stylistic/eslint-plugin-jsx'; | |
| import stylisticPlus from '@stylistic/eslint-plugin-plus'; | |
| import parserTs from '@typescript-eslint/parser'; | |
| const stylisticConfigs = [ | |
| { | |
| plugins: { | |
| '@stylistic/ts': stylisticTs, | |
| '@stylistic/js': stylisticJs, | |
| '@stylistic/jsx': stylisticJsx, | |
| '@stylistic/plus': stylisticPlus, | |
| }, | |
| files: [ | |
| '**/*.ts', | |
| '**/*.tsx', | |
| ], | |
| languageOptions: { | |
| parserOptions: { | |
| ecmaFeatures: { | |
| jsx: true, | |
| tsx: true | |
| }, | |
| ecmaVersion: 2020, | |
| useJSXTextNode: true, | |
| parser: parserTs, | |
| } | |
| }, | |
| rules: { | |
| '@stylistic/js/indent': ['error', 2], | |
| '@stylistic/ts/semi': 1, | |
| '@stylistic/js/no-whitespace-before-property': 'error', | |
| '@stylistic/jsx/jsx-self-closing-comp': 'error' | |
| }, | |
| }, | |
| ]; | |
| export default defineConfig([ | |
| ..., | |
| stylisticConfigs | |
| ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment