Skip to content

Commit 88e684f

Browse files
committed
add lint:ci script for gitHub Actions
1 parent f8db37d commit 88e684f

File tree

5 files changed

+38
-1
lines changed

5 files changed

+38
-1
lines changed

.drone.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ steps:
66
- name: build
77
image: node:18
88
commands:
9+
- brew install vale
910
- yarn
1011
- yarn build
1112

.eslintignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
7+
# testing
8+
/coverage
9+
10+
# production
11+
/build
12+

.eslintrc.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:react/recommended"
9+
],
10+
"overrides": [
11+
],
12+
"parserOptions": {
13+
"ecmaVersion": "latest",
14+
"sourceType": "module"
15+
},
16+
"plugins": [
17+
"react"
18+
],
19+
"rules": {
20+
}
21+
}

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"serve": "docusaurus serve",
1414
"write-translations": "docusaurus write-translations",
1515
"write-heading-ids": "docusaurus write-heading-ids",
16+
"lint:eslint": "eslint ./src/**/*.js*",
17+
"lint:vale": "vale tutorials/**/**.md* docs/**/**.md*",
18+
"lint:ci": "yarn lint:eslint && yarn lint:vale",
1619
"typecheck": "tsc"
1720
},
1821
"dependencies": {

src/theme/MDXComponents.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
// import React from "react";
22
// Import the original mapper
33
import MDXComponents from "@theme-original/MDXComponents";
44
import DocVideo from "@site/src/components/DocVideo";

0 commit comments

Comments
 (0)