mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-18 15:42:54 +00:00
test: add eslint config validation
This commit is contained in:
1
index.js
1
index.js
@@ -25,6 +25,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'no-console': 1,
|
||||
'unicorn/filename-case': 'error',
|
||||
'unicorn/no-array-callback-reference': 'off',
|
||||
'unicorn/no-useless-undefined': 'off',
|
||||
|
||||
1380
package-lock.json
generated
1380
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
@@ -5,7 +5,8 @@
|
||||
"description": "A collection of configuration base files for StApps projects.",
|
||||
"scripts": {
|
||||
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
|
||||
"prepublishOnly": "npm ci && npm run build",
|
||||
"test": "eslint -c index.js test/test-file.ts",
|
||||
"prepublishOnly": "npm ci",
|
||||
"postversion": "npm run changelog",
|
||||
"preversion": "npm run prepublishOnly",
|
||||
"push": "git push && git push origin \"v$npm_package_version\""
|
||||
@@ -15,23 +16,32 @@
|
||||
"url": "git@gitlab.com:openstapps/eslint-config.git"
|
||||
},
|
||||
"author": "Thea Schöbl",
|
||||
"contributors": [
|
||||
"Rainer Killinger <mail-openstapps@killinger.co>"
|
||||
],
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/parser": ">=5.15.0",
|
||||
"typescript": "4.4.3"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"typescript": "4.4.4",
|
||||
"@openstapps/configuration": "0.29.0",
|
||||
"@typescript-eslint/eslint-plugin": ">=5.15.0",
|
||||
"@typescript-eslint/parser": ">=5.15.0",
|
||||
"conventional-changelog-cli": "2.1.1",
|
||||
"prepend-file-cli": "1.0.6",
|
||||
"rimraf": "3.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=8.11.0",
|
||||
"eslint-config-prettier": ">=8.5.0",
|
||||
"eslint-plugin-jsdoc": ">=38.0.6",
|
||||
"eslint-plugin-prettier": ">=4.0.0",
|
||||
"eslint-plugin-unicorn": ">=41.0.1",
|
||||
"prettier": ">=2.6.0",
|
||||
"@typescript-eslint/eslint-plugin": ">=5.15.0"
|
||||
"prettier": ">=2.6.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": ">=5.15.0",
|
||||
"@typescript-eslint/parser": ">=5.15.0",
|
||||
"eslint": ">=8.11.0",
|
||||
"eslint-config-prettier": ">=8.5.0",
|
||||
"eslint-plugin-jsdoc": ">=38.0.6",
|
||||
"eslint-plugin-prettier": ">=4.0.0",
|
||||
"eslint-plugin-unicorn": ">=41.0.1",
|
||||
"prettier": ">=2.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
12
test/test-file.ts
Normal file
12
test/test-file.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Simple TS source file to get linted
|
||||
* Can be used to verify new/changed rule behavior
|
||||
*/
|
||||
function addNumbers(a: number, b: number) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
const sum: number = addNumbers(10, 15);
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Sum of the two numbers is: ' + sum);
|
||||
3
tsconfig.json
Normal file
3
tsconfig.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./node_modules/@openstapps/configuration/tsconfig.json"
|
||||
}
|
||||
Reference in New Issue
Block a user