-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split into two packages, use lerna as publisher (#22)
close #21
- Loading branch information
Showing
37 changed files
with
2,182 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
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
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": "git@github.com:rx-ts/eslint-plugin-mdx.git", | ||
"author": "JounQin <admin@1stg.me>", | ||
"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": "git@github.com:rx-ts/eslint-plugin-mdx.git", | ||
"author": "JounQin <admin@1stg.me>", | ||
"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
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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"esModuleInterop": true, | ||
"jsx": "preserve", | ||
"lib": ["esnext"], | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"outDir": "lib", | ||
"sourceMap": true, | ||
"strict": true, | ||
"strictFunctionTypes": false, | ||
"strictNullChecks": false, | ||
"target": "es5" | ||
} | ||
} |
Oops, something went wrong.