-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Showing
38 changed files
with
2,189 additions
and
152 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
lib | ||
node_modules | ||
dist | ||
*.log |
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,3 +1,7 @@ | ||
require('ts-node').register({ | ||
transpileOnly: true, | ||
}) | ||
|
||
module.exports = { | ||
root: true, | ||
settings: { | ||
|
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,3 +1,4 @@ | ||
lib | ||
node_modules | ||
dist | ||
tsconfig.tsbuildinfo | ||
*.log |
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 |
---|---|---|
|
@@ -17,21 +17,21 @@ before_install: | |
script: | ||
- set -e | ||
- yarn lint | ||
- yarn test | ||
- yarn build | ||
- yarn test | ||
|
||
before_deploy: | ||
- set -e | ||
- git remote set-url origin https://user:[email protected]/$TRAVIS_REPO_SLUG.git | ||
- npm set //registry.npmjs.org/:_authToken $NPM_TOKEN | ||
- git fetch origin master:master | ||
- git checkout master | ||
- yarn run standard-version -a | ||
- git push --follow-tags origin master | ||
|
||
deploy: | ||
provider: npm | ||
email: [email protected] | ||
api_key: $NPM_TOKEN | ||
provider: script | ||
skip_cleanup: true | ||
script: yarn run lerna publish from-package | ||
on: | ||
branch: release |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
modulePathIgnorePatterns: ['<rootDir>/packages/'], | ||
} |
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,6 @@ | ||
{ | ||
"version": "0.0.0", | ||
"npmClient": "yarn", | ||
"packages": ["packages/*"], | ||
"useWorkspaces": true | ||
} |
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,41 +1,24 @@ | ||
{ | ||
"name": "@rxts/eslint-plugin-mdx", | ||
"version": "0.7.1", | ||
"name": "eslint-mdx", | ||
"version": "0.0.0", | ||
"description": "ESLint Parser/Plugin for MDX", | ||
"repository": "[email protected]:rx-ts/eslint-plugin-mdx.git", | ||
"author": "JounQin <[email protected]>", | ||
"main": "dist", | ||
"license": "MIT", | ||
"files": [ | ||
"dist", | ||
"types.d.ts" | ||
"private": true, | ||
"workspaces": [ | ||
"packages" | ||
], | ||
"scripts": { | ||
"prepublishOnly": "yarn build", | ||
"build": "tsc -P src", | ||
"postinstall": "lerna clean --yes && lerna bootstrap", | ||
"build": "tsc -b", | ||
"test": "jest", | ||
"lint": "EFF_NO_LINK_RULES=true eslint . --ext js,mdx,ts,tsx -f friendly" | ||
}, | ||
"keywords": [ | ||
"eslint", | ||
"eslint-parser", | ||
"eslint-plugin", | ||
"eslint-parser-mdx", | ||
"eslint-plugin-mdx", | ||
"mdx", | ||
"eslint-mdx" | ||
], | ||
"peerDependencies": { | ||
"eslint": ">=5.0.0" | ||
}, | ||
"dependencies": { | ||
"remark-mdx": "^1.1.4", | ||
"remark-parse": "^7.0.0", | ||
"unified": "^8.3.2" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/config-conventional": "^8.1.0", | ||
"@rxts/eslint-plugin-mdx": "file:config", | ||
"@rxts/eslint-plugin-mdx": "link:packages/eslint-plugin-mdx/src", | ||
"@types/eslint": "^4.16.6", | ||
"@types/jest": "^24.0.16", | ||
"@types/node": "^12.6.9", | ||
|
@@ -46,16 +29,21 @@ | |
"eslint": "^6.1.0", | ||
"eslint-config-1stg": "~5.4.1", | ||
"eslint-formatter-friendly": "^7.0.0", | ||
"eslint-mdx": "link:packages/eslint-mdx/src", | ||
"eslint-plugin-jest": "^22.14.1", | ||
"husky": "^3.0.2", | ||
"jest": "^24.8.0", | ||
"lerna": "^3.16.4", | ||
"lint-staged": "^9.2.1", | ||
"prettier": "1.18.2", | ||
"prettier-config-1stg": "^0.1.0", | ||
"react": "^16.8.6", | ||
"remark-mdx": "^1.1.5", | ||
"remark-parse": "^7.0.0", | ||
"standard-version": "^7.0.0", | ||
"ts-jest": "^24.0.2", | ||
"ts-node": "^8.3.0", | ||
"typescript": "^3.5.3" | ||
"typescript": "^3.5.3", | ||
"unified": "^8.3.2" | ||
} | ||
} |
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,23 @@ | ||
{ | ||
"name": "eslint-mdx", | ||
"version": "0.8.0", | ||
"description": "ESLint Parser for MDX", | ||
"repository": "[email protected]:rx-ts/eslint-plugin-mdx.git", | ||
"author": "JounQin <[email protected]>", | ||
"license": "MIT", | ||
"main": "dist", | ||
"files": [ | ||
"dist", | ||
"typings.d.ts" | ||
], | ||
"keywords": [ | ||
"eslint", | ||
"eslint-parser", | ||
"eslint-parser-mdx", | ||
"mdx", | ||
"eslint-mdx" | ||
], | ||
"peerDependencies": { | ||
"eslint": ">=5.0.0" | ||
} | ||
} |
File renamed without changes.
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,5 @@ | ||
export * from './helper' | ||
export * from './parser' | ||
export * from './regexp' | ||
export * from './traverse' | ||
export * from './types' |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,8 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"rootDir": "src", | ||
"outDir": "lib" | ||
} | ||
} |
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,29 @@ | ||
{ | ||
"name": "@rxts/eslint-plugin-mdx", | ||
"version": "0.8.0", | ||
"description": "ESLint Plugin for MDX", | ||
"repository": "[email protected]:rx-ts/eslint-plugin-mdx.git", | ||
"author": "JounQin <[email protected]>", | ||
"license": "MIT", | ||
"main": "dist", | ||
"files": [ | ||
"dist", | ||
"typings.d.ts" | ||
], | ||
"keywords": [ | ||
"eslint", | ||
"eslint-plugin", | ||
"eslint-plugin-mdx", | ||
"mdx", | ||
"eslint-mdx" | ||
], | ||
"peerDependencies": { | ||
"eslint": ">=5.0.0" | ||
}, | ||
"dependencies": { | ||
"eslint-mdx": "^0.8.0", | ||
"remark-mdx": "^1.1.5", | ||
"remark-parse": "^7.0.0", | ||
"unified": "^8.3.2" | ||
} | ||
} |
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 @@ | ||
export const base = { | ||
parser: 'eslint-mdx', | ||
plugins: ['@rxts/mdx'], | ||
} |
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,2 @@ | ||
export * from './base' | ||
export * from './recommended' |
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,13 @@ | ||
import { base } from './base' | ||
|
||
export const recommended = { | ||
...base, | ||
rules: { | ||
'@rxts/mdx/no-jsx-html-comments': 2, | ||
'@rxts/mdx/no-unescaped-entities': 1, | ||
'@rxts/mdx/no-unused-expressions': 2, | ||
'no-unused-expressions': 0, | ||
'react/no-unescaped-entities': 0, | ||
'react/react-in-jsx-scope': 0, | ||
}, | ||
} |
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,27 @@ | ||
import { parse as oParse, parseForESLint as oParseForESLint } from 'eslint-mdx' | ||
|
||
import * as configs from './configs' | ||
|
||
import { Linter } from 'eslint' | ||
|
||
export { configs } | ||
|
||
export * from './rules' | ||
|
||
const warn = () => | ||
console.error( | ||
'parse from this plugin is deprecated, please use parser `eslint-mdx` directly', | ||
) | ||
|
||
export const parse = (code: string, options?: Linter.ParserOptions) => { | ||
warn() | ||
return oParse(code, options) | ||
} | ||
|
||
export const parseForESLint = ( | ||
code: string, | ||
options?: Linter.ParserOptions, | ||
) => { | ||
warn() | ||
oParseForESLint(code, options) | ||
} |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/rules/no-jsx-html-comments.ts → ...gin-mdx/src/rules/no-jsx-html-comments.ts
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
5 changes: 2 additions & 3 deletions
5
src/rules/no-unescaped-entities.ts → ...in-mdx/src/rules/no-unescaped-entities.ts
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
2 changes: 1 addition & 1 deletion
2
src/rules/no-unused-expressions.ts → ...in-mdx/src/rules/no-unused-expressions.ts
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
File renamed without changes.
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,8 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"composite": true, | ||
"rootDir": "src", | ||
"outDir": "lib" | ||
} | ||
} |
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,11 @@ | ||
declare module 'eslint/lib/rules/no-unused-expressions' { | ||
import { Rule } from 'eslint' | ||
const noUnUsedExpressions: Rule.RuleModule | ||
export = noUnUsedExpressions | ||
} | ||
|
||
declare module 'eslint-plugin-react/lib/rules/no-unescaped-entities' { | ||
import { Rule } from 'eslint' | ||
const reactNoUnEscapedEntities: Rule.RuleModule | ||
export = reactNoUnEscapedEntities | ||
} |
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
Oops, something went wrong.