-
-
Notifications
You must be signed in to change notification settings - Fork 31
feat!: move to ESM only #516
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
24fd765
feat: move to ESM only
43081j 5f00256
chore: move to c8 for esm support
43081j f5414d9
Merge branch 'main' into esm-only
bmish 89ad425
chore: revert some mistaken replaces
43081j ba2fa3c
fix: add no-meta-replaced-by to index
43081j 080bcfa
Merge branch 'main' into esm-only
bmish 8a8fb60
mocha timeout from 2000 to 3000 for slow no-property-in-node test
bmish 478a904
git ignore coverage/
bmish b1f33d7
Revert "mocha timeout from 2000 to 3000 for slow no-property-in-node …
bmish f790e2c
Merge branch 'main' into esm-only
43081j d2d5667
chore: remove duplicate gitignore
43081j 6fb2506
chore: revert comment change
43081j File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
export default { | ||
singleQuote: true, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
'use strict'; | ||
|
||
module.exports = { extends: ['@commitlint/config-conventional'] }; | ||
export default { extends: ['@commitlint/config-conventional'] }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/all-type-checked']; | ||
|
||
module.exports = plugin.configs['flat/all-type-checked']; | ||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/all']; | ||
|
||
module.exports = plugin.configs['flat/all']; | ||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/recommended']; | ||
|
||
module.exports = plugin.configs['flat/recommended']; | ||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/rules-recommended']; | ||
|
||
module.exports = plugin.configs['flat/rules-recommended']; | ||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/rules']; | ||
|
||
module.exports = plugin.configs['flat/rules']; | ||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/tests-recommended']; | ||
|
||
module.exports = plugin.configs['flat/tests-recommended']; | ||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* @author 唯然<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
import plugin from '../lib/index.js'; | ||
|
||
const plugin = require('../lib/index.js'); | ||
const config = plugin.configs['flat/tests']; | ||
|
||
module.exports = plugin.configs['flat/tests']; | ||
export default config; |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,19 @@ | |
* @author 薛定谔的猫<[email protected]> | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// ------------------------------------------------------------------------------ | ||
// Requirements | ||
// ------------------------------------------------------------------------------ | ||
|
||
const utils = require('../utils'); | ||
const { getStaticValue } = require('@eslint-community/eslint-utils'); | ||
import * as utils from '../utils.js'; | ||
import { getStaticValue } from '@eslint-community/eslint-utils'; | ||
|
||
// ------------------------------------------------------------------------------ | ||
// Rule Definition | ||
// ------------------------------------------------------------------------------ | ||
|
||
/** @type {import('eslint').Rule.RuleModule} */ | ||
module.exports = { | ||
const rule = { | ||
meta: { | ||
type: 'problem', | ||
docs: { | ||
|
@@ -167,3 +165,5 @@ module.exports = { | |
}; | ||
}, | ||
}; | ||
|
||
export default rule; |
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
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
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
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.
This is generated by hand now? Authors of new rules usually forget to update this kind of thing so just want to confirm
tests/index.js
verifies everything is included here properly?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.
it is
we could write a script to auto generate it if that helps
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.
It's fine for now.