diff --git a/Jenkinsfile b/Jenkinsfile index 377c15b..bd53ef7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline { VERSION = VersionNumber([ versionNumberString: '${BUILDS_ALL_TIME}', - versionPrefix: '2.0.', + versionPrefix: '2.1.', worstResultForIncrement: 'SUCCESS' ]) } diff --git a/README.md b/README.md index a8e2446..ba14f2e 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -# Sapphirecode ESLint configuration +# @sapphirecode/eslint-config -Javascript coding standard used by Sapphirecode +[![Package quality](https://packagequality.com/badge/%40sapphirecode%2Feslint-config)](https://packagequality.com/#?package=%40sapphirecode%2Feslint-config) + +version: 2.1.x + +scode eslint standard configuration ## 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 -then install the module and eslint +yarn: -```sh -npm i --save-dev @scode/eslint-config eslint -``` +> yarn add --dev @sapphirecode/eslint-config then create a file named .eslintrc.js with the following contents. @@ -32,5 +32,7 @@ module.exports = { ] } ``` - -after that you can run eslint. + +## License + +BSD-3-Clause © Timo Hocker diff --git a/index.js b/index.js index 9465fe7..954f27e 100644 --- a/index.js +++ b/index.js @@ -34,7 +34,6 @@ module.exports = { // Best Practices https://eslint.org/docs/rules/#best-practices 'array-callback-return': ['error', { allowImplicit: false }], 'block-scoped-var': 'error', - 'class-methods-use-this': 'off', complexity: ['warn', { max: 15 }], 'consistent-return': ['error', { treatUndefinedAsUnspecified: false }], curly: ['error', 'multi-or-nest', 'consistent'], @@ -66,7 +65,6 @@ module.exports = { 'no-iterator': 'error', 'no-lone-blocks': 'error', 'no-loop-func': 'error', - 'no-magic-numbers': 'off', 'no-multi-spaces': 'error', 'no-multi-str': 'error', 'no-new': 'error', @@ -137,7 +135,6 @@ module.exports = { 'consistent-this': 'error', 'eol-last': 'error', 'func-call-spacing': ['error', 'always'], - 'no-spaced-func': 'off', 'func-name-matching': ['error', 'always'], 'func-names': ['error', 'always'], 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], @@ -293,7 +290,6 @@ module.exports = { // node 'node/exports-style': 'error', - 'node/file-extension-in-import': 'off', 'node/prefer-global/buffer': 'error', 'node/prefer-global/console': 'error', 'node/prefer-global/process': 'error', @@ -302,8 +298,6 @@ module.exports = { 'node/prefer-global/url-search-params': 'error', 'node/prefer-global/url': 'error', 'node/prefer-promises/dns': 'error', - 'node/no-unpublished-require': 'off', - 'node/no-missing-import': 'off', // sort-requires-by-path 'sort-requires-by-path/sort-requires-by-path': 'error' diff --git a/jenkins.js b/jenkins.js index 0cd1194..37c1969 100644 --- a/jenkins.js +++ b/jenkins.js @@ -26,12 +26,12 @@ if (typeof pkg.repository === 'undefined') { } function major (version) { - return version.replace (/\.[0-9]+$/ui, ''); + return version.replace (/\.[0-9x]+$/ui, ''); } if (fs.existsSync ('README.md')) { const readme = fs.readFileSync ('README.md', 'utf-8'); - const version = (/version: ([0-9.]+)/ui).exec (readme); + const version = (/version: ([0-9x.]+)/ui).exec (readme); if ( version === null || major (version[1]) !== major (pkg.version) diff --git a/package.json b/package.json index 98ed15f..23fa5a3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "url": "https://git.scode.ovh/timo/scode-eslint-config.git" }, "peerDependencies": { - "eslint": ">=6.8.0" + "eslint": ">=7.0.0" }, "keywords": [ "eslint",