Compare commits
11 Commits
refactor/s
...
eslint-fla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce3aaa778f | ||
|
|
2861c80e16 | ||
|
|
b2c26278b5 | ||
|
|
11b43a924d | ||
|
|
48173c75ed | ||
|
|
b59997aa47 | ||
|
|
a30cfefd88 | ||
|
|
8887c614d8 | ||
|
|
3f78e8249f | ||
|
|
b584de02a3 | ||
|
|
6a6b498d9a |
31
.eslintrc
Normal file
31
.eslintrc
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"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,6 +11,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@@ -18,21 +19,10 @@ jobs:
|
|||||||
node-version: [20.x, 18.x]
|
node-version: [20.x, 18.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v2
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v1
|
||||||
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 eslintCds = require('@sap/eslint-plugin-cds')
|
const globals = require("globals");
|
||||||
const eslintJs = require('@eslint/js')
|
const js = require('@eslint/js');
|
||||||
const globals = require('globals')
|
const cds = require('@sap/eslint-plugin-cds');
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
eslintJs.configs.recommended,
|
cds.configs.recommended,
|
||||||
eslintCds.configs.recommended,
|
|
||||||
{
|
{
|
||||||
languageOptions: {
|
"files": ["**/*.js"],
|
||||||
globals: {
|
...js.configs.recommended,
|
||||||
sap: true,
|
"languageOptions": {
|
||||||
...globals.es2022,
|
"globals": {
|
||||||
...globals.browser,
|
...globals.browser,
|
||||||
...globals.node,
|
...globals.node,
|
||||||
...globals.jest,
|
...globals.jest,
|
||||||
...globals.mocha,
|
...globals.mocha,
|
||||||
...eslintCds.configs.recommended.languageOptions.globals
|
"es2022": true
|
||||||
}
|
|
||||||
},
|
},
|
||||||
rules: {
|
},
|
||||||
'no-console': 'off',
|
"rules": {
|
||||||
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
...js.configs.recommended.rules,
|
||||||
'require-atomic-updates': 'off',
|
"no-console": "off",
|
||||||
'require-await': 'warn'
|
"require-atomic-updates": "off",
|
||||||
|
"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,8 +39,7 @@
|
|||||||
"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,
|
||||||
@@ -55,4 +54,4 @@
|
|||||||
},
|
},
|
||||||
"license": "SEE LICENSE IN LICENSE",
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user