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: {
|
||||||
...js.configs.recommended.rules,
|
'no-console': 'off',
|
||||||
"no-console": "off",
|
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
||||||
"require-atomic-updates": "off",
|
'require-atomic-updates': 'off',
|
||||||
"require-await": "warn",
|
'require-await': 'warn'
|
||||||
"no-unused-vars": ["warn", { "argsIgnorePattern": "_" }]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
6801
package-lock.json
generated
6801
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
113
package.json
113
package.json
@@ -1,57 +1,58 @@
|
|||||||
{
|
{
|
||||||
"name": "@capire/samples",
|
"name": "@capire/samples",
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"description": "A monorepo with several samples for CAP.",
|
"description": "A monorepo with several samples for CAP.",
|
||||||
"repository": "https://github.com/sap-samples/cloud-cap-samples.git",
|
"repository": "https://github.com/sap-samples/cloud-cap-samples.git",
|
||||||
"author": "daniel.hutzel@sap.com",
|
"author": "daniel.hutzel@sap.com",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sap/cds": ">=7"
|
"@sap/cds": ">=7"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"./bookshop",
|
"./bookshop",
|
||||||
"./bookstore",
|
"./bookstore",
|
||||||
"./common",
|
"./common",
|
||||||
"./data-viewer",
|
"./data-viewer",
|
||||||
"./fiori",
|
"./fiori",
|
||||||
"./hello",
|
"./hello",
|
||||||
"./media",
|
"./media",
|
||||||
"./orders",
|
"./orders",
|
||||||
"./loggers",
|
"./loggers",
|
||||||
"./reviews"
|
"./reviews"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@cap-js/sqlite": "^1",
|
"@cap-js/sqlite": "^1",
|
||||||
"@sap/eslint-plugin-cds": "^3",
|
"@sap/eslint-plugin-cds": "^3",
|
||||||
"axios": "^1",
|
"axios": "^1",
|
||||||
"chai": "^4.3.4",
|
"chai": "^4.3.4",
|
||||||
"chai-as-promised": "^7.1.1",
|
"chai-as-promised": "^7.1.1",
|
||||||
"chai-subset": "^1.6.0",
|
"chai-subset": "^1.6.0",
|
||||||
"eslint": "^9",
|
"eslint": "^9",
|
||||||
"semver": "^7"
|
"semver": "^7"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"cleanup": "rm -rf node_modules && rm -rf */node_modules && rm -rf */*/node_modules",
|
"cleanup": "rm -rf node_modules && rm -rf */node_modules && rm -rf */*/node_modules",
|
||||||
"bookshop": "cds watch bookshop",
|
"bookshop": "cds watch bookshop",
|
||||||
"fiori": "cds watch fiori",
|
"fiori": "cds watch fiori",
|
||||||
"hello": "cds watch hello",
|
"hello": "cds watch hello",
|
||||||
"media": "cds watch media",
|
"media": "cds watch media",
|
||||||
"mocha": "CDS_TEST_SILENT=y npx mocha",
|
"mocha": "CDS_TEST_SILENT=y npx mocha",
|
||||||
"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": {
|
},
|
||||||
"testTimeout": 20000,
|
"jest": {
|
||||||
"testMatch": [
|
"testTimeout": 20000,
|
||||||
"**/*.test.js"
|
"testMatch": [
|
||||||
]
|
"**/*.test.js"
|
||||||
},
|
]
|
||||||
"mocha": {
|
},
|
||||||
"recursive": true,
|
"mocha": {
|
||||||
"parallel": true,
|
"recursive": true,
|
||||||
"timeout": 6666
|
"parallel": true,
|
||||||
},
|
"timeout": 6666
|
||||||
"license": "SEE LICENSE IN LICENSE",
|
},
|
||||||
"private": true
|
"license": "SEE LICENSE IN LICENSE",
|
||||||
}
|
"private": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user