Skip to content

Commit

Permalink
predefine eslint cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashleyhx committed Dec 12, 2023
1 parent 1b19d10 commit f5dc55d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ jobs:

- name: Run linters without auto-fix (on master)
if: github.ref == 'refs/heads/master'
run: ./node_modules/.bin/eslint --ext .js,.vue src
run: npm run eslint

- name: Run linters with auto-fix (on non-master branches)
if: github.ref != 'refs/heads/master'
run: ./node_modules/.bin/eslint --ext .js,.vue src --fix
run: npm run eslint-fix

- name: Commit changes
uses: EndBug/add-and-commit@v9
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"fetch-datasets": "node src/server/utils/FetchDatasets.js",
"generate-grammar-prod": "rm -rf src/utils/CypherParser/ && cp node_modules/kuzu/kuzu-source/src/antlr4/Cypher.g4 ./ && npx antlr4ng-cli -o src/utils/CypherParser -Dlanguage=TypeScript -no-visitor -no-listener Cypher.g4 && rm Cypher.g4 && cd src/utils/CypherParser && mv CypherParser.ts CypherParserOld.ts && grep -v \"notify\" CypherParserOld.ts > CypherParser.ts && rm CypherParserOld.ts",
"generate-grammar": "rm -rf src/utils/CypherParser/ && cp kuzu/src/antlr4/Cypher.g4 ./ && npx antlr4ng-cli -o src/utils/CypherParser -Dlanguage=TypeScript -no-visitor -no-listener Cypher.g4 && rm Cypher.g4 && cd src/utils/CypherParser && mv CypherParser.ts CypherParserOld.ts && grep -v \"notify\" CypherParserOld.ts > CypherParser.ts && rm CypherParserOld.ts",
"clean": "rm -rf node_modules dist datasets src/utils/CypherParser && git submodule deinit --all"
"clean": "rm -rf node_modules dist datasets src/utils/CypherParser && git submodule deinit --all",
"eslint": "eslint --ext .js,.vue src",
"eslint-fix": "eslint --ext .js,.vue src --fix"
},
"dependencies": {
"@antv/g6": "^4.8.22",
Expand Down

0 comments on commit f5dc55d

Please sign in to comment.