1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00

chore: reduce warnings eslint (#2515)

This commit is contained in:
Juan Picado 2021-10-18 21:36:53 +02:00 committed by GitHub
parent ffb087887a
commit 70d66eb473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 64 deletions

@ -112,7 +112,7 @@
"docker": "docker build -t verdaccio/verdaccio:local . --no-cache",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
"format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,yaml,md}\"",
"lint": "eslint --max-warnings 60 \"**/*.{js,jsx,ts,tsx}\"",
"lint": "eslint --max-warnings 45 \"**/*.{js,jsx,ts,tsx}\"",
"test": "pnpm recursive test --filter ./packages",
"test:e2e:cli": "pnpm test --filter ...@verdaccio/e2e-cli",
"test:e2e:ui": "pnpm test --filter ...@verdaccio/e2e-ui",

@ -81,69 +81,6 @@ describe('Utilities', () => {
});
});
// describe('validatePackage', () => {
// test('should validate package names', () => {
// expect(validatePackage('package-name')).toBeTruthy();
// expect(validatePackage('@scope/package-name')).toBeTruthy();
// });
// test('should fails on validate package names', () => {
// expect(validatePackage('package-name/test/fake')).toBeFalsy();
// expect(validatePackage('@/package-name')).toBeFalsy();
// expect(validatePackage('$%$%#$%$#%#$%$#')).toBeFalsy();
// expect(validatePackage('node_modules')).toBeFalsy();
// expect(validatePackage('__proto__')).toBeFalsy();
// expect(validatePackage('favicon.ico')).toBeFalsy();
// });
// describe('validateName', () => {
// test('should fails with no string', () => {
// // intended to fail with Typescript, do not remove
// // @ts-ignore
// expect(validateName(null)).toBeFalsy();
// // @ts-ignore
// expect(validateName(undefined)).toBeFalsy();
// });
// test('good ones', () => {
// expect(validateName('verdaccio')).toBeTruthy();
// expect(validateName('some.weird.package-zzz')).toBeTruthy();
// expect(validateName('old-package@0.1.2.tgz')).toBeTruthy();
// // fix https://github.com/verdaccio/verdaccio/issues/1400
// expect(validateName('-build-infra')).toBeTruthy();
// expect(validateName('@pkg-scoped/without-extension')).toBeTruthy();
// });
// test('should be valid using uppercase', () => {
// expect(validateName('ETE')).toBeTruthy();
// expect(validateName('JSONStream')).toBeTruthy();
// });
// test('should fails with path seps', () => {
// expect(validateName('some/thing')).toBeFalsy();
// expect(validateName('some\\thing')).toBeFalsy();
// });
// test('should fail with no hidden files', () => {
// expect(validateName('.bin')).toBeFalsy();
// });
// test('should fails with reserved words', () => {
// expect(validateName('favicon.ico')).toBeFalsy();
// expect(validateName('node_modules')).toBeFalsy();
// expect(validateName('__proto__')).toBeFalsy();
// });
// test('should fails with other options', () => {
// expect(validateName('pk g')).toBeFalsy();
// expect(validateName('pk\tg')).toBeFalsy();
// expect(validateName('pk%20g')).toBeFalsy();
// expect(validateName('pk+g')).toBeFalsy();
// expect(validateName('pk:g')).toBeFalsy();
// });
// });
// });
describe('validateMetadata', () => {
test('should fills an empty metadata object', () => {
// intended to fail with flow, do not remove