-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use flat config & eslint v9 #152
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
29d0c9a
chore: use flat config & eslint v9
ota-meshi 69eb41e
fix ci
ota-meshi e3c6612
fix ci
ota-meshi 751e222
fix ci
ota-meshi b739dae
replace -f with force = true in .npmrc
ota-meshi 467eba5
remove unnecessary globals
ota-meshi b79f528
update n/file-extension-in-import config
ota-meshi 6086e6b
fix
ota-meshi File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,4 @@ | |
"javascript", | ||
"vue" | ||
], | ||
"eslint.options": { | ||
"rulePaths": ["eslint-internal/rules"] | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -43,50 +43,57 @@ const format = reactive({ | |
}) | ||
|
||
const config = computed(() => ({ | ||
globals: { | ||
// ES2015 globals | ||
ArrayBuffer: false, | ||
DataView: false, | ||
Float32Array: false, | ||
Float64Array: false, | ||
Int16Array: false, | ||
Int32Array: false, | ||
Int8Array: false, | ||
Map: false, | ||
Promise: false, | ||
Proxy: false, | ||
Reflect: false, | ||
Set: false, | ||
Symbol: false, | ||
Uint16Array: false, | ||
Uint32Array: false, | ||
Uint8Array: false, | ||
Uint8ClampedArray: false, | ||
WeakMap: false, | ||
WeakSet: false, | ||
// ES2017 globals | ||
Atomics: false, | ||
SharedArrayBuffer: false, | ||
// ES2020 globals | ||
BigInt: false, | ||
BigInt64Array: false, | ||
BigUint64Array: false, | ||
globalThis: true, | ||
// ES2021 globals | ||
AggregateError: false, | ||
FinalizationRegistry: false, | ||
WeakRef: false, | ||
// Intl | ||
Intl: false, | ||
plugins: { | ||
"es-x": { | ||
rules, | ||
}, | ||
}, | ||
rules: {}, | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
languageOptions: { | ||
sourceType: props.sourceType, | ||
ecmaFeatures: { | ||
jsx: true, | ||
ecmaVersion: "latest", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
globals: { | ||
// ES2015 globals | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you don't need to specify es globals - in flat mode, they should have been enabled by default. |
||
ArrayBuffer: false, | ||
DataView: false, | ||
Float32Array: false, | ||
Float64Array: false, | ||
Int16Array: false, | ||
Int32Array: false, | ||
Int8Array: false, | ||
Map: false, | ||
Promise: false, | ||
Proxy: false, | ||
Reflect: false, | ||
Set: false, | ||
Symbol: false, | ||
Uint16Array: false, | ||
Uint32Array: false, | ||
Uint8Array: false, | ||
Uint8ClampedArray: false, | ||
WeakMap: false, | ||
WeakSet: false, | ||
// ES2017 globals | ||
Atomics: false, | ||
SharedArrayBuffer: false, | ||
// ES2020 globals | ||
BigInt: false, | ||
BigInt64Array: false, | ||
BigUint64Array: false, | ||
globalThis: true, | ||
// ES2021 globals | ||
AggregateError: false, | ||
FinalizationRegistry: false, | ||
WeakRef: false, | ||
// Intl | ||
Intl: false, | ||
}, | ||
}, | ||
rules: {}, | ||
settings: { | ||
"es-x": { aggressive: true }, | ||
}, | ||
|
@@ -109,10 +116,6 @@ onMounted(async () => { | |
const [{ Linter }] = await Promise.all([import("eslint")]) | ||
|
||
linter.value = markRaw(new Linter()) | ||
|
||
for (const ruleId of Object.keys(rules)) { | ||
linter.value.defineRule(`es-x/${ruleId}`, rules[ruleId]) | ||
} | ||
}) | ||
|
||
/** | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits: you can add
force=true
to the .npmrc, to avoid repeating. :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I didn't know that. That's useful.