-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
051fc0a
commit de6882e
Showing
13 changed files
with
60 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
src | ||
test | ||
.* | ||
*.log |
Empty file.
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,37 @@ | ||
{ | ||
"name": "@babel/eslint-plugin-internal", | ||
"version": "0.0.0", | ||
"description": "The Babel Team's ESLint custom rules plugin. Since it's internal, it might not respect semver.", | ||
"main": "lib/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/babel/babel.git", | ||
"directory": "eslint/babel-eslint-plugin-internal" | ||
}, | ||
"keywords": [ | ||
"babel", | ||
"eslint", | ||
"eslintplugin", | ||
"eslint-plugin", | ||
"babel-eslint" | ||
], | ||
"author": "Kai Cataldo <kai@kaicataldo.com", | ||
"license": "MIT", | ||
"private": true, | ||
"engines": { | ||
"node": ">=10.9" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/babel/babel/issues" | ||
}, | ||
"homepage": "https://github.com/babel/babel/tree/master/eslint/babel-eslint-plugin-internal", | ||
"peerDependencies": { | ||
"@babel/eslint-parser": "0.0.0", | ||
"eslint": ">=6.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/eslint-parser": "*", | ||
"@babel/eslint-shared-fixtures": "*", | ||
"eslint": "^6.0.0" | ||
} | ||
} |
Empty file.
Empty file.
9 changes: 9 additions & 0 deletions
9
eslint/babel-eslint-plugin-internal/test/rules/dry-error-messages.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import rule from "../../src/rules/dry-error-messages"; | ||
import RuleTester from "@babel/eslint-shared-fixtures/utils/RuleTester"; | ||
|
||
const ruleTester = new RuleTester(); | ||
|
||
ruleTester.run("dry-error-messages", rule, { | ||
valid: [], | ||
invalid: [], | ||
}); |
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
7 changes: 4 additions & 3 deletions
7
...-eslint-plugin/test/helpers/RuleTester.js → ...slint-shared-fixtures/utils/RuleTester.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
import { RuleTester } from "eslint"; | ||
const path = require("path"); | ||
const { RuleTester } = require("eslint"); | ||
|
||
RuleTester.setDefaultConfig({ | ||
parser: require.resolve("@babel/eslint-parser"), | ||
parserOptions: { | ||
babelOptions: { | ||
configFile: require.resolve( | ||
"@babel/eslint-shared-fixtures/config/babel.config.js", | ||
path.join(__dirname, "../config/babel.config.js") | ||
), | ||
}, | ||
}, | ||
}); | ||
|
||
export default RuleTester; | ||
module.exports = RuleTester; |