Skip to content

Commit

Permalink
feat: support lint markdown files, add standard-react config
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Aug 30, 2019
1 parent 3210985 commit 8841cde
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/core": "^7.5.5",
"@commitlint/config-conventional": "^8.1.0",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.2",
"@types/node": "^12.7.3",
"@types/react": "^16.9.2",
"commitlint": "^8.1.0",
"eslint": "^6.2.2",
Expand Down
15 changes: 13 additions & 2 deletions packages/eslint-config/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ exports.tslint = {

exports.react = {
files: '*.{js,jsx,tsx}',
extends: ['plugin:react/recommended', 'prettier/react'],
extends: [
'standard-react',
'plugin:react/recommended',
'prettier',
'prettier/react',
],
settings: {
react: {
version: 'detect',
Expand Down Expand Up @@ -221,8 +226,13 @@ exports.vue = {
plugins: ['vue'],
}

exports.md = {
files: '*.md',
extends: ['plugin:mdx/recommended'],
}

exports.mdx = Object.assign({}, exports.react, {
files: ['*.mdx'],
files: '*.mdx',
extends: exports.react.extends.concat([
'plugin:mdx/recommended',
'plugin:mdx/overrides',
Expand All @@ -249,6 +259,7 @@ exports.overrides = [
exports.reactTs,
exports.dTs,
exports.vue,
exports.md,
exports.mdx,
exports.jest,
]
Expand Down
5 changes: 2 additions & 3 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1stg/eslint-config",
"version": "0.3.1",
"version": "0.4.0",
"description": "Personal but Shareable ESLint Configuration for all 1stG.me projects.",
"repository": "git@github.com:1stG/configs.git",
"author": "JounQin <admin@1stg.me>",
Expand All @@ -9,14 +9,13 @@
"eslint": "^6.2.2"
},
"dependencies": {
"@1stg/prettier-config": "^0.1.0",
"@1stg/tsconfig": "^0.1.0",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/eslint-plugin-tslint": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"babel-eslint": "^11.0.0-beta.0",
"eslint-config-prettier": "^6.1.0",
"eslint-config-standard": "^14.1.0",
"eslint-config-standard-react": "^9.1.0",
"eslint-import-resolver-typescript": "JounQin/eslint-import-resolver-typescript#feat/resolve_dts",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.18.2",
Expand Down
19 changes: 18 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2346,11 +2346,16 @@
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==

"@types/node@*", "@types/node@^12.0.2", "@types/node@^12.7.2":
"@types/node@*", "@types/node@^12.0.2":
version "12.7.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.2.tgz#c4e63af5e8823ce9cc3f0b34f7b998c2171f0c44"
integrity sha512-dyYO+f6ihZEtNPDcWNR1fkoTDf3zAK3lAABDze3mz6POyIercH0lEUawUFXlG8xaQZmm1yEBON/4TsYv/laDYg==

"@types/node@^12.7.3":
version "12.7.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.7.3.tgz#27b3f40addaf2f580459fdb405222685542f907a"
integrity sha512-3SiLAIBkDWDg6vFo0+5YJyHPWU9uwu40Qe+v+0MH8wRKYBimHvvAOyk3EzMrD/TrIlLYfXrqDqrg913PynrMJQ==

"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
Expand Down Expand Up @@ -4236,6 +4241,18 @@ eslint-config-prettier@^6.1.0:
dependencies:
get-stdin "^6.0.0"

eslint-config-standard-jsx@^8.0.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz#314c62a0e6f51f75547f89aade059bec140edfc7"
integrity sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==

eslint-config-standard-react@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-standard-react/-/eslint-config-standard-react-9.1.0.tgz#6f08368db869064548846a851c3d6d72391268f9"
integrity sha512-CCJcGPtpGv29+ntl8OMc3I77Z36xZLIFopXR18i8omAVZko5MSruEXreGzGlnzbvPI5dCMCwt5xGN5djUqoGWw==
dependencies:
eslint-config-standard-jsx "^8.0.0"

eslint-config-standard@^14.1.0:
version "14.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz#b23da2b76fe5a2eba668374f246454e7058f15d4"
Expand Down

0 comments on commit 8841cde

Please sign in to comment.