mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-02-25 11:56:31 +00:00
chore: add eclint for editorconfig linting and fix violations
- Install eclint ^2.8.1 for editorconfig validation and fixing - Add .eclintignore to exclude generated files and dependencies - Add npm scripts: lint:editorconfig and lint:editorconfig:fix - Fix indentation issues in CONTRIBUTING.md (3 spaces -> 2 spaces) - Fix code alignment in scanner.c to match editorconfig rules - Regenerate parser after scanner.c formatting changes
This commit is contained in:
21
.eclintignore
Normal file
21
.eclintignore
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Generated files
|
||||||
|
src/parser.c
|
||||||
|
src/grammar.json
|
||||||
|
src/node-types.json
|
||||||
|
src/tree_sitter/
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
megalinter-reports/
|
||||||
|
|
||||||
|
# Lock files
|
||||||
|
package-lock.json
|
||||||
|
pnpm-lock.yaml
|
||||||
|
yarn.lock
|
||||||
2926
package-lock.json
generated
2926
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,8 @@
|
|||||||
"lint": "npx mega-linter-runner",
|
"lint": "npx mega-linter-runner",
|
||||||
"lint:yaml": "yamllint .",
|
"lint:yaml": "yamllint .",
|
||||||
"lint:markdown": "markdownlint . --config .markdownlint.json --ignore node_modules --fix",
|
"lint:markdown": "markdownlint . --config .markdownlint.json --ignore node_modules --fix",
|
||||||
|
"lint:editorconfig": "eclint check .",
|
||||||
|
"lint:editorconfig:fix": "eclint fix .",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format:check": "prettier --check .",
|
"format:check": "prettier --check .",
|
||||||
"precommit": "pre-commit run --all-files",
|
"precommit": "pre-commit run --all-files",
|
||||||
@@ -37,6 +39,7 @@
|
|||||||
"tree-sitter-bash": "^0.25.0"
|
"tree-sitter-bash": "^0.25.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"eclint": "^2.8.1",
|
||||||
"markdownlint-cli": "^0.46.0",
|
"markdownlint-cli": "^0.46.0",
|
||||||
"nodemon": "^3.0.1",
|
"nodemon": "^3.0.1",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Automatically @generated by tree-sitter v0.25.9 */
|
/* Automatically @generated by tree-sitter v0.25.10 */
|
||||||
|
|
||||||
#include "tree_sitter/parser.h"
|
#include "tree_sitter/parser.h"
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ struct TSLanguage {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) {
|
static inline bool set_contains(const TSCharacterRange *ranges, uint32_t len, int32_t lookahead) {
|
||||||
if (len == 0) return false;
|
|
||||||
uint32_t index = 0;
|
uint32_t index = 0;
|
||||||
uint32_t size = len - index;
|
uint32_t size = len - index;
|
||||||
while (size > 1) {
|
while (size > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user