mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 03:36:32 +08:00
update eslint to 9 + update actions (#6910)
This commit is contained in:
parent
6645fcecd5
commit
a18b9c7f81
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
parserOptions:
|
||||
ecmaVersion: 5
|
||||
env:
|
||||
browser: true
|
||||
extends:
|
||||
- eslint:recommended
|
||||
rules:
|
||||
quotes: ['error', 'double', { 'avoidEscape': true }]
|
||||
semi: ['error', 'always', { 'omitLastInOneLineBlock': true}]
|
||||
no-console: off
|
||||
indent: ['error', 2]
|
||||
no-trailing-spaces: ['error']
|
||||
no-unused-vars: ['warn']
|
7
.github/workflows/ajson_mirror.yaml
vendored
7
.github/workflows/ajson_mirror.yaml
vendored
|
@ -19,11 +19,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: run
|
||||
run: |
|
||||
git clone https://github.com/abapGit/ajson_mirror.git
|
||||
|
|
23
.github/workflows/main-build.yml
vendored
23
.github/workflows/main-build.yml
vendored
|
@ -9,11 +9,8 @@ jobs:
|
|||
build-merged:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Run npm steps
|
||||
run: |
|
||||
npm install
|
||||
|
@ -44,12 +41,10 @@ jobs:
|
|||
outputs:
|
||||
pushedTag: ${{ steps.deploy-release-tag.outputs.pushedTag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- uses: actions/setup-node@v4
|
||||
- name: deploy-release-tag
|
||||
id: deploy-release-tag
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit'
|
||||
|
@ -64,12 +59,12 @@ jobs:
|
|||
needs: [build-merged, auto-tag]
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' && !!needs.auto-tag.outputs.pushedTag
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: abapGit/build
|
||||
path: build
|
||||
ssh-key: ${{ secrets.DEPLOY_ABAPGIT_BUILD }}
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: abapGit
|
||||
- name: mirror tag to the artifact
|
||||
|
@ -84,10 +79,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: npm run unit
|
||||
run: |
|
||||
npm install
|
||||
|
|
2
.github/workflows/reuse.yml
vendored
2
.github/workflows/reuse.yml
vendored
|
@ -6,6 +6,6 @@ jobs:
|
|||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: REUSE Compliance Check
|
||||
uses: fsfe/reuse-action@v1
|
||||
|
|
21
.github/workflows/test-pr.yml
vendored
21
.github/workflows/test-pr.yml
vendored
|
@ -11,12 +11,9 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
- name: npm install
|
||||
run: |
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- run: |
|
||||
npm install
|
||||
npm run eslint
|
||||
npm run merge
|
||||
|
@ -32,10 +29,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: npm install
|
||||
run: npm install
|
||||
- name: npm run unit
|
||||
|
@ -48,10 +43,8 @@ jobs:
|
|||
needs: unit-tests
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '20'
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: npm install
|
||||
run: npm install
|
||||
- name: start gitea
|
||||
|
|
42
eslint.config.mjs
Normal file
42
eslint.config.mjs
Normal file
|
@ -0,0 +1,42 @@
|
|||
import js from "@eslint/js";
|
||||
import globals from "globals";
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
"languageOptions": {
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2015
|
||||
},
|
||||
"sourceType": "script",
|
||||
"globals": globals.browser,
|
||||
},
|
||||
"rules": {
|
||||
"quotes": [
|
||||
"error",
|
||||
"double",
|
||||
{
|
||||
"avoidEscape": true
|
||||
}
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always",
|
||||
{
|
||||
"omitLastInOneLineBlock": true
|
||||
}
|
||||
],
|
||||
"no-console": "off",
|
||||
"indent": [
|
||||
"error",
|
||||
2
|
||||
],
|
||||
"no-trailing-spaces": [
|
||||
"error"
|
||||
],
|
||||
"no-unused-vars": [
|
||||
"warn"
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
11
package.json
11
package.json
|
@ -8,7 +8,7 @@
|
|||
"build": "rm -rf output && abap_transpile test/abap_transpile.json",
|
||||
"unit": "npm run build && echo RUNNING && node output/index.mjs",
|
||||
"coverage": "npm run unit && c8 node output/index.mjs && c8 report --reporter=html",
|
||||
"integration": "rm -rf output && cp test/abap_transpile.json test/abap_transpile_int.json && sed -i 's/src,deps/test\\\/src,src,deps/g' test/abap_transpile_int.json && abap_transpile test/abap_transpile_int.json && echo RUNNING && node output/index.mjs",
|
||||
"integration": "rm -rf output && cp test/abap_transpile.json test/abap_transpile_int.json && sed -i 's/src,deps/test\\/src,src,deps/g' test/abap_transpile_int.json && abap_transpile test/abap_transpile_int.json && echo RUNNING && node output/index.mjs",
|
||||
"abaplint": "abaplint --format codeframe",
|
||||
"eslint": "eslint src"
|
||||
},
|
||||
|
@ -23,12 +23,13 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@abaplint/cli": "^2.106.5",
|
||||
"@abaplint/cli": "^2.106.8",
|
||||
"@abaplint/database-sqlite": "^2.8.0",
|
||||
"@abaplint/runtime": "^2.8.22",
|
||||
"@abaplint/transpiler-cli": "^2.8.22",
|
||||
"@abaplint/runtime": "^2.8.24",
|
||||
"@abaplint/transpiler-cli": "^2.8.24",
|
||||
"globals": "^15.0.0",
|
||||
"abapmerge": "^0.16.0",
|
||||
"c8": "^9.1.0",
|
||||
"eslint": "^8.57.0"
|
||||
"eslint": "^9.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2447,7 +2447,7 @@ function enumerateJumpAllFiles() {
|
|||
function saveScrollPosition() {
|
||||
// Not supported by Java GUI
|
||||
try { if (!window.sessionStorage) { return } }
|
||||
catch (err) { return }
|
||||
catch (err) { return err }
|
||||
|
||||
window.sessionStorage.setItem("scrollTop", document.querySelector("html").scrollTop);
|
||||
}
|
||||
|
@ -2455,7 +2455,7 @@ function saveScrollPosition() {
|
|||
function restoreScrollPosition() {
|
||||
// Not supported by Java GUI
|
||||
try { if (!window.sessionStorage) { return } }
|
||||
catch (err) { return }
|
||||
catch (err) { return err }
|
||||
|
||||
var scrollTop = window.sessionStorage.getItem("scrollTop");
|
||||
if (scrollTop) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user