Skip to content

Commit a9c9954

Browse files
authored
GLSP-1578: Minor follow up fixes (#447)
- Ensure that we are also publish if there are changes in the examples directories (publish-next.yml) - Add prettier/eslint ignore files - Clean up root scripts and add scripts for formatting
1 parent 6c33f38 commit a9c9954

File tree

7 files changed

+37
-9
lines changed

7 files changed

+37
-9
lines changed

.eslintignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Compiled output
2+
**/dist/
3+
**/lib/
4+
**/node_modules/
5+
6+
# Build files
7+
**/.eslintrc.js
8+
**/esbuild.js
9+
10+
# Other generated files
11+
**/*.map
12+
13+
**/scripts/

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
module.exports = {
33
root: true,
44
extends: '@eclipse-glsp',
5-
ignorePatterns: ['**/{node_modules,lib}', '**/.eslintrc.js', '**/scripts/*.ts'],
65

76
parserOptions: {
87
tsconfigRootDir: __dirname,

.github/workflows/publish-next.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
# Required for lerna to determine the version of the next package.
2424
fetch-depth: 0
2525
ref: ${{ github.event.workflow_run.head_commit.id || github.sha }}
26-
- name: Check for changes in "packages" directory
26+
- name: Check for changes in "packages" or "examples" directory
2727
id: check_changes
2828
run: |
29-
if git diff --name-only HEAD^ HEAD | grep -qE '^packages'; then
29+
if git diff --name-only HEAD^ HEAD | grep -qE '^(packages|examples)'; then
3030
echo "changes=true" >> $GITHUB_ENV
3131
else
3232
echo "changes=false" >> $GITHUB_ENV

.prettierignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build outputs
5+
lib/
6+
dist/
7+
8+
# Generated files
9+
*.min.js
10+
*.min.css
11+
12+
# Lock files
13+
package-lock.json
14+
yarn.lock
15+
16+
# Logs
17+
*.log

examples/workflow-standalone/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = {
7373
new webpack.WatchIgnorePlugin({ paths: [/\.js$/, /\.d\.ts$/] }),
7474
new webpack.DefinePlugin({
7575
GLSP_SERVER_HOST: JSON.stringify(process.env.GLSP_SERVER_HOST || 'localhost'),
76-
GLSP_SERVER_PORT: JSON.stringify(process.env.GLSP_SERVER_PORT || '8081'),
76+
GLSP_SERVER_PORT: JSON.stringify(process.env.GLSP_SERVER_PORT || '8081')
7777
})
7878
]
7979
};

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
"build": "yarn compile && yarn bundle",
1212
"bundle": "yarn standalone bundle",
1313
"check:headers": "glsp checkHeaders . -t lastCommit",
14-
"check:pr": "yarn all && yarn check:headers",
14+
"check:pr": "yarn all && yarn check:format && yarn check:headers",
1515
"clean": "lerna run clean && rimraf coverage .nyc_output",
1616
"compile": "tsc -b",
17+
"format": "prettier --write .",
18+
"format:check": "prettier --check .",
1719
"generate:index": "lerna run generate:index && yarn lint:fix",
1820
"lint": "eslint --ext .ts,.tsx .",
1921
"lint:ci": "yarn lint --output-file eslint_report.json --format json",
2022
"lint:fix": " yarn lint --fix",
2123
"prepare": "yarn build",
22-
"publish:latest": "lerna publish from-git --no-git-reset --no-git-tag-version --no-push",
2324
"publish:next": "lerna publish preminor --exact --canary --preid next --dist-tag next --no-git-reset --no-git-tag-version --no-push --ignore-scripts --yes",
24-
"publish:prepare": "lerna version --ignore-scripts --yes --no-push",
2525
"standalone": "yarn --cwd ./examples/workflow-standalone",
2626
"start:exampleServer": "yarn standalone start:exampleServer",
2727
"test": "lerna run test --no-bail",

tsconfig.eslint.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"compilerOptions": {
44
"noEmit": true
55
},
6-
"exclude": ["**/node_modules", "**/.eslintrc.js"],
7-
"include": ["packages/*/src", "examples/*/src", "**/workflow-glsp/scripts"]
6+
"include": ["packages/*/src", "examples/*/src"]
87
}

0 commit comments

Comments
 (0)