Skip to content

Commit

Permalink
ci: add linting and formatting automation to tree-sitter_v (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm authored Mar 25, 2024
1 parent 55bf1e3 commit da0005b
Show file tree
Hide file tree
Showing 7 changed files with 1,368 additions and 1,551 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ concurrency:

jobs:
test:
name: Test tree-sitter
runs-on: ubuntu-latest
defaults:
run:
working-directory: tree_sitter_v

steps:
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: 20

- name: Checkout v-analyzer
uses: actions/checkout@v4

- name: Install dependencies
run: cd tree_sitter_v && npm update
run: npm update

- name: Run tests
run: cd tree_sitter_v && npm run test
run: npm run test

- name: Lint
run: npm run lint

- name: Verify formatting
run: npm run format:check
15 changes: 15 additions & 0 deletions tree_sitter_v/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
env: {
commonjs: true,
es2024: true,
},
extends: [
'google',
'prettier', // Use prettier for formatting, disable potentially conflicting rules.
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
};
2 changes: 0 additions & 2 deletions tree_sitter_v/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
grammar.js symlink=file

src/tree_sitter/* linguist-generated
src/grammar.json linguist-generated
src/node-types.json linguist-generated
Expand Down
5 changes: 5 additions & 0 deletions tree_sitter_v/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
printWidth: 100,
singleQuote: true,
useTabs: true,
};
Loading

0 comments on commit da0005b

Please sign in to comment.