From 663dbbfa191429317d083ab47f4cb9bc22b046d6 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 20 Jul 2020 15:44:53 +0100 Subject: [PATCH 1/6] test: add smoke test ensuring all rules make it into lib/index --- tests/check-rules.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/check-rules.js diff --git a/tests/check-rules.js b/tests/check-rules.js new file mode 100644 index 00000000..a1a6da4d --- /dev/null +++ b/tests/check-rules.js @@ -0,0 +1,13 @@ +/* globals describe, it*/ +const config = require('../lib/index.js') +const fs = require('fs') +const assert = require('assert') +const path = require('path') + +describe('smoke tests', () => { + it('ensure all rules in lib/rules are included in index', () => { + const exportedRules = new Set(Object.keys(config.rules)) + const files = new Set(fs.readdirSync('./lib/rules').map(f => path.basename(f, path.extname(f)))) + assert.deepEqual(files, exportedRules) + }) +}) From a37fec5dc2e274852303df572c33fbdd8c93ad33 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 20 Jul 2020 15:51:57 +0100 Subject: [PATCH 2/6] test: add smoke test ensuring every config is exported --- tests/check-rules.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/check-rules.js b/tests/check-rules.js index a1a6da4d..d15dc280 100644 --- a/tests/check-rules.js +++ b/tests/check-rules.js @@ -10,4 +10,10 @@ describe('smoke tests', () => { const files = new Set(fs.readdirSync('./lib/rules').map(f => path.basename(f, path.extname(f)))) assert.deepEqual(files, exportedRules) }) + + it('exports every config in lib/config as .configs', () => { + const exportedConfigs = new Set(Object.keys(config.configs)) + const files = new Set(fs.readdirSync('./lib/configs').map(f => path.basename(f, path.extname(f)))) + assert.deepEqual(files, exportedConfigs) + }) }) From e1f65a063a2e2a7f3f9552f12fe8b2136c466184 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 20 Jul 2020 15:52:11 +0100 Subject: [PATCH 3/6] test: add smoke test ensuring every config rule is one that is exported --- tests/check-rules.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/check-rules.js b/tests/check-rules.js index d15dc280..4c22acc1 100644 --- a/tests/check-rules.js +++ b/tests/check-rules.js @@ -16,4 +16,15 @@ describe('smoke tests', () => { const files = new Set(fs.readdirSync('./lib/configs').map(f => path.basename(f, path.extname(f)))) assert.deepEqual(files, exportedConfigs) }) + + it('exports valid rules in each config', () => { + const exportedRules = new Set(Object.keys(config.rules)) + for (const flavour in config.configs) { + for (const rule in config.configs[flavour].rules) { + if (rule.startsWith('github/')) { + assert(exportedRules.has(rule.replace(/^github\//, '')), `rule ${rule} is not a valid rule`) + } + } + } + }) }) From 5e54eac1d6ed9b17b5394c9043c67804a57735f9 Mon Sep 17 00:00:00 2001 From: Nikita Galkin Date: Thu, 4 Mar 2021 11:25:01 -0400 Subject: [PATCH 4/6] Update plugin:github/typescript config --- lib/configs/typescript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/configs/typescript.js b/lib/configs/typescript.js index ff480bef..d5981b14 100644 --- a/lib/configs/typescript.js +++ b/lib/configs/typescript.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'prettier/@typescript-eslint'], + extends: ['plugin:@typescript-eslint/recommended', 'prettier'], parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint', 'github'], rules: { From 073014c8bc02cad485b19451a993c3b8a111b896 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 4 Mar 2021 15:42:48 +0000 Subject: [PATCH 5/6] update eslint-config-prettier>=8.0.0 --- package-lock.json | 91 ++++++++++++++++++++++++++++++++++++----------- package.json | 6 ++-- 2 files changed, 74 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7365f5f2..5557a050 100644 --- a/package-lock.json +++ b/package-lock.json @@ -87,6 +87,13 @@ "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==", "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } } } } @@ -100,6 +107,13 @@ "@typescript-eslint/experimental-utils": "2.25.0", "@typescript-eslint/typescript-estree": "2.25.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + } } }, "@typescript-eslint/typescript-estree": { @@ -116,6 +130,11 @@ "tsutils": "^3.17.1" }, "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -701,6 +720,21 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -721,16 +755,19 @@ "requires": { "ansi-regex": "^5.0.0" } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true } } }, "eslint-config-prettier": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz", - "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==", - "requires": { - "get-stdin": "^6.0.0" - } + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz", + "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==" }, "eslint-import-resolver-node": { "version": "0.3.3", @@ -861,12 +898,21 @@ "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true }, "espree": { "version": "7.0.0", @@ -877,6 +923,14 @@ "acorn": "^7.1.1", "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "esprima": { @@ -1043,11 +1097,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" - }, "glob": { "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", @@ -1072,12 +1121,12 @@ } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.6.0.tgz", + "integrity": "sha512-YFKCX0SiPg7l5oKYCJ2zZGxcXprVXHcSnVuvzrT3oSENQonVLqM5pf9fN5dLGZGyCjhw8TN8Btwe/jKnZ0pjvQ==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "graceful-fs": { @@ -2230,9 +2279,9 @@ } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "uri-js": { diff --git a/package.json b/package.json index d700da49..ed6555f2 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "scripts": { "pretest": "mkdir -p node_modules/ && ln -fs $(pwd) node_modules/", - "eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check", + "eslint-check": "eslint-config-prettier .eslintrc.js", "test": "npm run eslint-check && eslint . && mocha tests/" }, "repository": { @@ -27,7 +27,7 @@ "dependencies": { "@typescript-eslint/eslint-plugin": ">=2.25.0", "@typescript-eslint/parser": ">=2.25.0", - "eslint-config-prettier": ">=6.10.1", + "eslint-config-prettier": ">=8.0.0", "eslint-plugin-eslint-comments": ">=3.0.1", "eslint-plugin-import": ">=2.20.1", "eslint-plugin-prettier": ">=3.1.2", @@ -46,6 +46,8 @@ "devDependencies": { "@github/prettier-config": "0.0.4", "eslint": ">=7.0.0", + "eslint-visitor-keys": "^2.0.0", + "globals": "^13.6.0", "mocha": ">=7.1.1" } } From b6ab5b3f3310ad486d76a85ab36f0882af052eff Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 4 Mar 2021 15:45:39 +0000 Subject: [PATCH 6/6] 4.1.2 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5557a050..9e8c64de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-github", - "version": "4.1.1", + "version": "4.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ed6555f2..768e17b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-github", - "version": "4.1.1", + "version": "4.1.2", "description": "An opinionated collection of ESLint shared configs and rules used by GitHub.", "main": "lib/index.js", "entries": [ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy