Compare commits
61 Commits
6e31137186
...
master
Author | SHA1 | Date | |
---|---|---|---|
5f32178a27
|
|||
ef11b6830f
|
|||
c7f615cd65 | |||
7c1205e5fa | |||
c3a5819949 | |||
3c4a47e297 | |||
10fa53b0ea | |||
a7aebc6d54 | |||
543b8d50d1 | |||
94ff6b5c18 | |||
30eb7f5c35 | |||
e623469184 | |||
078b5a02e0 | |||
24ebea0ee7 | |||
20521ce401 | |||
94e67bba03 | |||
63835f20b8 | |||
bd25ca99e5 | |||
2536cef0be | |||
20fe002c32 | |||
a2130e5f56 | |||
f5a26666d5 | |||
9e334fca01 | |||
4a7fac62c9 | |||
4db5c5238d | |||
c49e732d2c | |||
dd1ec2a4ad | |||
80a0642323 | |||
5b98435154 | |||
d173b89944 | |||
a366c156b2 | |||
14a98b68a7 | |||
b70eac0b86 | |||
653c2ed70c | |||
b2d853559e | |||
06baf2ad8b | |||
221d372851 | |||
1a580ab4af | |||
6cc7ab36d1 | |||
4f3466ade6 | |||
feb3353be4 | |||
f2ca1cc9af | |||
4c34ae0e78 | |||
64d767d2d6 | |||
b324c25a00 | |||
e43cc4ff4e | |||
5b31ea8de7 | |||
ccbbe2d914 | |||
83e2f43fc0 | |||
037fe41c27 | |||
1b5db88a24 | |||
67f98e5c60 | |||
c271775a30 | |||
4d1b379a54 | |||
01e5e04e82 | |||
1e02ebb94b | |||
36147f470c | |||
d14a08034b | |||
10a9026442 | |||
7759147cbc | |||
8e00f5be8d |
14
.drone.yml
Normal file
14
.drone.yml
Normal file
@ -0,0 +1,14 @@
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: setup
|
||||
image: registry:5000/node-build
|
||||
commands:
|
||||
- yarn
|
||||
- curl https://git.scode.ovh/Timo/standard/raw/branch/master/ci.js > ci.js
|
||||
|
||||
- name: build
|
||||
image: registry:5000/node-build
|
||||
commands:
|
||||
- node ci.js
|
10
.eslintrc.js
10
.eslintrc.js
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) Sapphirecode - All Rights Reserved
|
||||
* This file is part of SCode-Eslint-Config which is released under BSD-3-Clause.
|
||||
* This file is part of eslint-config-ts which is released under MIT.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@sapphirecode.ovh>, March 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
@ -29,9 +29,9 @@ module.exports = {
|
||||
'array-bracket-newline': 'off',
|
||||
'max-len': 'off',
|
||||
'func-call-spacing': 'off',
|
||||
'semi': 'off',
|
||||
'curly': 'off',
|
||||
'strict': 'off',
|
||||
semi: 'off',
|
||||
curly: 'off',
|
||||
strict: 'off',
|
||||
'brace-style': 'off',
|
||||
'no-magic-numbers': 'off'
|
||||
}
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/node_modules/
|
||||
/node_modules/
|
||||
|
8
.liconfig.json
Normal file
8
.liconfig.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"has_license": true,
|
||||
"license": "MIT",
|
||||
"author": "Timo Hocker",
|
||||
"company": "Sapphirecode",
|
||||
"email": "timo@scode.ovh",
|
||||
"software": "eslint-config-ts"
|
||||
}
|
14
CHANGELOG.md
Normal file
14
CHANGELOG.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- enforce union sorting
|
||||
- enforce type annotation spacing
|
||||
|
||||
## 1.1.0
|
||||
|
||||
update to eslint 7.0
|
||||
|
||||
## 1.0.0
|
||||
|
||||
initial release
|
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@ -1,23 +0,0 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
VERSION = VersionNumber([
|
||||
versionNumberString:
|
||||
'${BUILDS_ALL_TIME}',
|
||||
versionPrefix: '1.0.',
|
||||
worstResultForIncrement: 'SUCCESS'
|
||||
])
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Building') {
|
||||
steps {
|
||||
script {
|
||||
currentBuild.displayName = env.VERSION
|
||||
}
|
||||
sh 'yarn ci ${VERSION}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
30
LICENSE
30
LICENSE
@ -1,29 +1,7 @@
|
||||
Copyright (c) 2020, Timo Hocker
|
||||
MIT License Copyright (c) <year> <author>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of scode-eslint-config nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
26
README.md
26
README.md
@ -1,20 +1,18 @@
|
||||
# Sapphirecode ESLint configuration
|
||||
# @sapphirecode/eslint-config-ts
|
||||
|
||||
Javascript coding standard used by Sapphirecode
|
||||
version: 1.2.x
|
||||
|
||||
scode eslint configuration for typescript
|
||||
|
||||
## Installation
|
||||
|
||||
to install this module you have to add the following line to your .npmrc
|
||||
npm:
|
||||
|
||||
```npmrc
|
||||
@scode:registry=https://npm.scode.ovh
|
||||
```
|
||||
> npm i --save-dev @sapphirecode/eslint-config-ts
|
||||
|
||||
then install the module and eslint
|
||||
yarn:
|
||||
|
||||
```sh
|
||||
npm i --save-dev @scode/eslint-ts eslint
|
||||
```
|
||||
> yarn add --dev @sapphirecode/eslint-config-ts
|
||||
|
||||
then create a file named .eslintrc.js with the following contents.
|
||||
|
||||
@ -28,9 +26,11 @@ module.exports = {
|
||||
node: true
|
||||
},
|
||||
extends: [
|
||||
'@scode/eslint-ts'
|
||||
'@sapphirecode/eslint-config-ts'
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
after that you can run eslint.
|
||||
|
||||
## License
|
||||
|
||||
MIT License © Timo Hocker <timo@scode.ovh>
|
||||
|
45
index.js
45
index.js
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Copyright (C) Sapphirecode - All Rights Reserved
|
||||
* This file is part of SCode-Eslint-Config which is released under BSD-3-Clause.
|
||||
* This file is part of eslint-config-ts which is released under MIT.
|
||||
* See file 'LICENSE' for full license details.
|
||||
* Created by Timo Hocker <timo@sapphirecode.ovh>, March 2020
|
||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
@ -18,7 +18,8 @@ module.exports = {
|
||||
],
|
||||
|
||||
plugins: [
|
||||
'@typescript-eslint'
|
||||
'@typescript-eslint',
|
||||
'eslint-plugin-tsdoc'
|
||||
],
|
||||
|
||||
parserOptions: {
|
||||
@ -34,34 +35,14 @@ module.exports = {
|
||||
|
||||
rules: {
|
||||
'@typescript-eslint/camelcase': 'off',
|
||||
'@typescript-eslint/naming-convention': ['error',
|
||||
{ selector: 'default', format: ['snake_case'] },
|
||||
{ selector: 'typeLike', format: ['PascalCase'] },
|
||||
{
|
||||
selector: 'property',
|
||||
modifiers: ['private'],
|
||||
format: ['snake_case'],
|
||||
leadingUnderscore: 'require'
|
||||
}
|
||||
],
|
||||
'id-match': ['error', '^([a-z][a-z0-9_]*|[A-Z][a-zA-Z]*)$', { onlyDeclarations: true }],
|
||||
'jsdoc/require-param-type': 'off',
|
||||
'jsdoc/require-jsdoc': 'off',
|
||||
'jsdoc/require-description': 'off',
|
||||
'jsdoc/check-alignment': 'off',
|
||||
'jsdoc/check-param-names': 'off',
|
||||
'jsdoc/check-tag-names': 'off',
|
||||
'jsdoc/check-types': 'off',
|
||||
'jsdoc/implements-on-classes': 'off',
|
||||
'jsdoc/newline-after-description': 'off',
|
||||
'jsdoc/no-undefined-types': 'off',
|
||||
'jsdoc/require-param': 'off',
|
||||
'jsdoc/require-param-description': 'off',
|
||||
'jsdoc/require-param-name': 'off',
|
||||
'jsdoc/require-returns': 'off',
|
||||
'jsdoc/require-returns-check': 'off',
|
||||
'jsdoc/require-returns-description': 'off',
|
||||
'jsdoc/require-returns-type': 'off',
|
||||
'jsdoc/valid-types': 'off'
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/type-annotation-spacing': 'error',
|
||||
'@typescript-eslint/sort-type-union-intersection-members': 'error',
|
||||
'tsdoc/syntax': 'error',
|
||||
// deactivating commonjs rules
|
||||
'id-match': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
'node/no-missing-import': 'off'
|
||||
}
|
||||
}
|
||||
|
26
jenkins.js
26
jenkins.js
@ -1,26 +0,0 @@
|
||||
/* eslint-disable no-process-exit */
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable no-sync */
|
||||
'use strict';
|
||||
|
||||
const fs = require ('fs');
|
||||
const child_process = require ('child_process');
|
||||
|
||||
const pkg = JSON.parse (fs.readFileSync ('package.json', 'utf-8'));
|
||||
[
|
||||
,, pkg.version
|
||||
] = process.argv;
|
||||
fs.writeFileSync ('package.json', JSON.stringify (pkg, null, 2));
|
||||
|
||||
child_process.execSync ('yarn lint', { stdio: 'inherit' });
|
||||
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
||||
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
||||
|
||||
child_process.exec ('git log -1 | grep \'\\[no publish\\]\'')
|
||||
.addListener ('exit', (code) => {
|
||||
if (code === 0) {
|
||||
console.log ('build not marked for deployment');
|
||||
process.exit (1);
|
||||
}
|
||||
else { child_process.execSync ('yarn publish --access public'); }
|
||||
});
|
29
package.json
29
package.json
@ -1,12 +1,11 @@
|
||||
{
|
||||
"name": "@sapphirecode/eslint-config-ts",
|
||||
"version": "1.0.0",
|
||||
"version": "1.2.2",
|
||||
"description": "scode eslint typescript configuration",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.vue,.mjs",
|
||||
"test": "echo \"no test\"",
|
||||
"ci": "yarn --frozen-lockfile && node jenkins.js",
|
||||
"compile": "tsc --allowJs --declaration --emitDeclarationOnly index.js"
|
||||
},
|
||||
"repository": {
|
||||
@ -14,27 +13,31 @@
|
||||
"url": "https://git.scode.ovh/timo/eslint-ts.git"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=6.8.0",
|
||||
"typescript": ">=3.8.0"
|
||||
"eslint": ">=8.4.0",
|
||||
"typescript": ">=4.4.0"
|
||||
},
|
||||
"keywords": [
|
||||
"eslint",
|
||||
"eslintconfig"
|
||||
],
|
||||
"author": "Timo Hocker",
|
||||
"license": "BSD-3-Clause",
|
||||
"author": {
|
||||
"name": "Timo Hocker",
|
||||
"email": "timo@scode.ovh"
|
||||
},
|
||||
"bugs": "https://redmine.scode.ovh/projects/eslint-ts",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard": "^14.1.0",
|
||||
"eslint": "^8.4.0",
|
||||
"eslint-config-standard": "^16.0.1",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-standard": "^4.0.1"
|
||||
"eslint-plugin-promise": "^5.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sapphirecode/eslint-config-es6": "^1.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
||||
"@typescript-eslint/parser": "^2.26.0"
|
||||
"@sapphirecode/eslint-config-es6": "^1.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint-plugin-tsdoc": "^0.2.14"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
|
Reference in New Issue
Block a user