Skip to content

Commit

Permalink
Add linting for code blocks in markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos authored and ljharb committed Jun 16, 2017
1 parent e7e68d9 commit c1e8c2f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_book/
build/
21 changes: 21 additions & 0 deletions .eslintrc-markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "./.eslintrc",
"root": true,
"plugins": [
"markdown"
],
"rules": {
"class-methods-use-this": 0,
"import/no-unresolved": 0,
"import/no-extraneous-dependencies": 0,
"import/extensions": 0,
"max-len": 0,
"no-unused-vars": 0,
"no-console": 0,
"no-undef": 0,
"react/react-in-jsx-scope": 0,
"react/jsx-filename-extension": 0,
"react/jsx-no-undef": 0,
"react/no-multi-comp": 0,
},
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"react:15.4": "npm run react:clean && npm install && npm i --no-save react@15.4 react-dom@15.4 react-addons-test-utils@15.4",
"react:15": "npm run react:clean && npm install && npm i --no-save react@15 react-dom@15 create-react-class@15 react-test-renderer@^15.5.4",
"docs:clean": "rimraf _book",
"docs:lint": "eslint --ext md --config .eslintrc-markdown .",
"docs:prepare": "gitbook install",
"docs:build": "npm run docs:prepare && gitbook build",
"docs:watch": "npm run docs:prepare && gitbook serve",
Expand Down Expand Up @@ -86,6 +87,7 @@
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-jsx-a11y": "^5.0.3",
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-react": "^7.0.1",
"gitbook-cli": "^1.0.1",
"in-publish": "^2.0.0",
Expand Down

0 comments on commit c1e8c2f

Please sign in to comment.