Compare commits
7 Commits
eslint-fla
...
refactor/s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55e4c92a60 | ||
|
|
7738f85036 | ||
|
|
d9f50d635f | ||
|
|
546f374b08 | ||
|
|
bb127bcc58 | ||
|
|
d08749fd21 | ||
|
|
be5696b14e |
31
.eslintrc
31
.eslintrc
@@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"plugin:@sap/cds/recommended",
|
|
||||||
"eslint:recommended"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es2022": true,
|
|
||||||
"node": true,
|
|
||||||
"jest": true,
|
|
||||||
"mocha": true
|
|
||||||
},
|
|
||||||
"globals": {
|
|
||||||
"SELECT": true,
|
|
||||||
"INSERT": true,
|
|
||||||
"UPSERT": true,
|
|
||||||
"UPDATE": true,
|
|
||||||
"DELETE": true,
|
|
||||||
"CREATE": true,
|
|
||||||
"DROP": true,
|
|
||||||
"CDL": true,
|
|
||||||
"CQL": true,
|
|
||||||
"cds": true
|
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"no-console": "off",
|
|
||||||
"require-atomic-updates": "off",
|
|
||||||
"require-await":"warn",
|
|
||||||
"no-unused-vars": ["warn", { "argsIgnorePattern": "_" }]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
16
.github/workflows/node.js.yml
vendored
16
.github/workflows/node.js.yml
vendored
@@ -11,7 +11,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@@ -19,10 +18,21 @@ jobs:
|
|||||||
node-version: [20.x, 18.x]
|
node-version: [20.x, 18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm test
|
- run: npm test
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20.x
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run lint
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
"@cap-js/sqlite": "*"
|
"@cap-js/sqlite": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sap/cds": "^7",
|
"@sap/cds": ">=7",
|
||||||
"express": "^4.17.1"
|
"express": "^4.17.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
const globals = require("globals");
|
const eslintCds = require('@sap/eslint-plugin-cds')
|
||||||
const js = require('@eslint/js');
|
const eslintJs = require('@eslint/js')
|
||||||
const cds = require('@sap/eslint-plugin-cds');
|
const globals = require('globals')
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
cds.configs.recommended,
|
eslintJs.configs.recommended,
|
||||||
|
eslintCds.configs.recommended,
|
||||||
{
|
{
|
||||||
"files": ["**/*.js"],
|
languageOptions: {
|
||||||
...js.configs.recommended,
|
globals: {
|
||||||
"languageOptions": {
|
sap: true,
|
||||||
"globals": {
|
...globals.es2022,
|
||||||
...globals.browser,
|
...globals.browser,
|
||||||
...globals.node,
|
...globals.node,
|
||||||
...globals.jest,
|
...globals.jest,
|
||||||
...globals.mocha,
|
...globals.mocha,
|
||||||
"es2022": true
|
...eslintCds.configs.recommended.languageOptions.globals
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
rules: {
|
||||||
"rules": {
|
'no-console': 'off',
|
||||||
...js.configs.recommended.rules,
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||||
"no-console": "off",
|
'require-atomic-updates': 'off',
|
||||||
"require-atomic-updates": "off",
|
'require-await': 'warn'
|
||||||
"require-await": "warn",
|
|
||||||
"no-unused-vars": ["warn", { "argsIgnorePattern": "_" }]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
639
package-lock.json
generated
639
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,8 @@
|
|||||||
"jest": "npx jest --silent",
|
"jest": "npx jest --silent",
|
||||||
"start": "cds watch fiori",
|
"start": "cds watch fiori",
|
||||||
"test": "npm run jest -- --silent",
|
"test": "npm run jest -- --silent",
|
||||||
"test:hello": "cd hello && npm test"
|
"test:hello": "cd hello && npm test",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"testTimeout": 20000,
|
"testTimeout": 20000,
|
||||||
|
|||||||
Reference in New Issue
Block a user