-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add linting for scripts and markdown files (#52)
- Loading branch information
1 parent
5b15a24
commit fd65aec
Showing
16 changed files
with
764 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ insert_final_newline = true | |
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
quote_type = single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore datapack/resourcepack | ||
datapacks | ||
resourcepack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
env: | ||
commonjs: true | ||
es2021: true | ||
node: true | ||
extends: eslint:recommended | ||
parserOptions: | ||
ecmaVersion: latest | ||
rules: | ||
no-var: 'error' |
7 changes: 4 additions & 3 deletions
7
.github/workflows/validate.yml → .github/workflows/datapack.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
name: validate | ||
name: datapack | ||
|
||
on: [push, workflow_dispatch] | ||
on: [push] | ||
|
||
# TODO(37): add linting | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: CarbonSmasher/packtest_runner@86d606f25d2bd2faa08b017326fe99964ac3aa5c | ||
- name: Run PackTest | ||
uses: CarbonSmasher/packtest_runner@86d606f25d2bd2faa08b017326fe99964ac3aa5c | ||
with: | ||
packs: 'datapacks/omega-flowey' | ||
packtest-url: 'https://github.com/misode/packtest/releases/download/v1.0/packtest-1.0-mc1.20.4.jar' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: scripts | ||
|
||
on: [push] | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Yarn 3.6.3 | ||
run: corepack enable | ||
- name: Setup cache | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
node-version-file: package.json | ||
- run: yarn | ||
- name: Run Prettier | ||
run: yarn start lint.prettier.check | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: format | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Yarn 3.6.3 | ||
run: corepack enable | ||
- name: Setup cache | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: 'yarn' | ||
cache-dependency-path: yarn.lock | ||
node-version-file: package.json | ||
- run: yarn | ||
- name: Run ESLint | ||
run: yarn start lint.eslint.check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Ignore datapack/resourcepack | ||
datapacks | ||
resourcepack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{ | ||
"recommendations": [ | ||
"minecraftcommands.syntax-mcfunction", | ||
"spgoding.datapack-language-server" | ||
"spgoding.datapack-language-server", | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"arcanis.vscode-zipfs" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"search.exclude": { | ||
"**/.yarn": true, | ||
"**/.pnp.*": true | ||
}, | ||
"eslint.nodePath": ".yarn/sdks", | ||
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
defaultSemverRangePrefix: "" | ||
yarnPath: .yarn/releases/yarn-3.6.3.cjs | ||
# save exact npm package by default when running `yarn add` | ||
defaultSemverRangePrefix: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,21 @@ | |
"name": "omega-flowey-minecraft-remastered", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"lint": "nps lint", | ||
"lint.fix": "nps lint.fix", | ||
"start": "nps", | ||
"sync": "nps sync.world" | ||
}, | ||
"engines": { | ||
"node": ">=16.10" | ||
}, | ||
"devDependencies": { | ||
"bestzip": "1.1.6", | ||
"cpy-cli": "5.0.0", | ||
"eslint": "8.56.0", | ||
"nps": "5.10.0", | ||
"nps-utils": "1.7.0", | ||
"prettier": "3.1.1", | ||
"rimraf": "5.0.1", | ||
"watch": "1.0.2" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.