-
-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
ESLint config
import { defineConfig } from 'eslint/config'
import pluginImportX from 'eslint-plugin-import-x'
export default defineConfig([
{
plugins: {
'import-x': pluginImportX,
},
rules: {
'import-x/newline-after-import': 'error',
},
},
])Source code
import prettier from 'prettier'
;(() => {})()ESLint expected output
ESLint consider the code from import to ; as an ImportDeclaration and requires a newline after ; .
import prettier from 'prettier'
;
(() => {})()Prettier expected output
Prettier treat the IIFE with semi as a whole part and want to delete the newline before it.
import prettier from 'prettier'
;(() => {})()Repro repo
shirakaba
Metadata
Metadata
Assignees
Labels
No labels