Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert ESLint plugins to CommonJS (#14180)
- Loading branch information
1 parent
a38d54c
commit 9e9301d
Showing
35 changed files
with
117 additions
and
118 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
12 changes: 12 additions & 0 deletions
12
eslint/babel-eslint-plugin-development-internal/src/index.cjs
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const dryErrorMessages = require("./rules/dry-error-messages.cjs"); | ||
const reportErrorMessageFormat = require("./rules/report-error-message-format.cjs"); | ||
|
||
const rules = { | ||
"dry-error-messages": dryErrorMessages, | ||
"report-error-message-format": reportErrorMessageFormat, | ||
}; | ||
|
||
exports.rules = rules; | ||
if (!process.env.BABEL_8_BREAKING) { | ||
exports.default = { 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
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
4 changes: 2 additions & 2 deletions
4
eslint/babel-eslint-plugin-development-internal/test/rules/report-error-message-formtat.js
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const noDeprecatedClone = require("./rules/no-deprecated-clone.cjs"); | ||
const noUndefinedIdentifier = require("./rules/no-undefined-identifier.cjs"); | ||
const pluginName = require("./rules/plugin-name.cjs"); | ||
|
||
const rules = { | ||
"no-deprecated-clone": noDeprecatedClone, | ||
"no-undefined-identifier": noUndefinedIdentifier, | ||
"plugin-name": pluginName, | ||
}; | ||
|
||
exports.rules = rules; | ||
if (!process.env.BABEL_8_BREAKING) { | ||
exports.default = { rules }; | ||
} |
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...elopment/src/rules/no-deprecated-clone.ts → ...lopment/src/rules/no-deprecated-clone.cjs
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
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
4 changes: 2 additions & 2 deletions
4
eslint/babel-eslint-plugin-development/test/rules/plugin-name.js
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const newCap = require("./rules/new-cap.cjs"); | ||
const noInvalidThis = require("./rules/no-invalid-this.cjs"); | ||
const noUnusedExpressions = require("./rules/no-unused-expressions.cjs"); | ||
const objectCurlySpacing = require("./rules/object-curly-spacing.cjs"); | ||
const semi = require("./rules/semi.cjs"); | ||
|
||
const rules = { | ||
"new-cap": newCap, | ||
"no-invalid-this": noInvalidThis, | ||
"no-unused-expressions": noUnusedExpressions, | ||
"object-curly-spacing": objectCurlySpacing, | ||
semi, | ||
}; | ||
|
||
const rulesConfig = { | ||
"new-cap": "off", | ||
"no-invalid-this": "off", | ||
"no-unused-expressions": "off", | ||
"object-curly-spacing": "off", | ||
semi: "off", | ||
}; | ||
|
||
exports.rules = rules; | ||
exports.rulesConfig = rulesConfig; | ||
|
||
if (!process.env.BABEL_8_BREAKING) { | ||
exports.default = { rules, rulesConfig }; | ||
} |
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
6 changes: 3 additions & 3 deletions
6
...slint-plugin/src/rules/no-invalid-this.ts → ...lint-plugin/src/rules/no-invalid-this.cjs
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.