-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also updated scripts, extended eslint config @umatch-eslint-config, linted and formatted all files, removed default exports and improved typing. BREAKING CHANGE: removed default exports.
- Loading branch information
Showing
15 changed files
with
2,576 additions
and
1,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,9 @@ | ||
{ | ||
"env": { "es6": true, "node": true }, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 12, | ||
"sourceType": "module", | ||
"project": ["tsconfig.base.json"] | ||
}, | ||
"extends": [ | ||
"plugin:import/recommended", | ||
"plugin:prettier/recommended" | ||
], | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts", ".tsx"] | ||
}, | ||
"import/resolver": { | ||
"node": { }, | ||
"typescript": { | ||
"alwaysTryTypes": true, | ||
"project": "*/tsconfig.json" | ||
} | ||
} | ||
}, | ||
"ignorePatterns": ["node_modules", "lib", "*.lock"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"args": "after-used", | ||
"argsIgnorePattern": "^_", | ||
"destructuredArrayIgnorePattern": "^_", | ||
"varsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": ["error", { "functions": false }], | ||
"complexity": "error", | ||
"eqeqeq": ["error", "smart"], | ||
"import/order": [ | ||
"warn", | ||
{ | ||
"alphabetize": { "order": "asc", "caseInsensitive": true }, | ||
"groups": [ | ||
["builtin", "external", "unknown"], | ||
["internal", "parent", "sibling", "index"], | ||
["object", "type"] | ||
], | ||
"newlines-between": "always" | ||
} | ||
], | ||
"max-classes-per-file": ["error", 1], | ||
"new-cap": ["error", { "capIsNew": false }], | ||
"no-constant-condition": ["error", { "checkLoops": false }], | ||
"no-nested-ternary": "off", | ||
"no-restricted-syntax": [ | ||
"error", | ||
"ForInStatement", | ||
"LabeledStatement", | ||
"WithStatement" | ||
], | ||
"no-shadow": "off", | ||
"no-unused-vars": "off", | ||
"no-use-before-define": "off", | ||
"no-useless-constructor": "warn", | ||
"no-useless-return": "error", | ||
"padding-line-between-statements": [ | ||
"warn", | ||
{ | ||
"blankLine": "always", | ||
"prev": "*", | ||
"next": ["const", "let", "var"] | ||
}, | ||
{ | ||
"blankLine": "any", | ||
"prev": ["const", "let", "var"], | ||
"next": ["const", "let", "var"] | ||
} | ||
], | ||
"prefer-const": "error", | ||
"radix": "off" | ||
} | ||
"parserOptions": { | ||
"project": ["tsconfig.base.json"] | ||
}, | ||
"extends": [ | ||
"@umatch/eslint-config", | ||
"plugin:@typescript-eslint/recommended-type-checked" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*lock* | ||
lib | ||
docs | ||
*.md | ||
*.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
printWidth: 90, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,48 @@ | ||
{ | ||
"name": "@umatch/env-parser", | ||
"version": "0.1.0", | ||
"description": "Parse and validate environment variables, with TypeScript support", | ||
"author": "Gabriel Okamoto <gabrielokamoto@hotmail.com>", | ||
"repository": "https://github.com/umatch-oficial/env-parser.git", | ||
"homepage": "https://github.com/umatch-oficial/env-parser#readme", | ||
"bugs": "https://github.com/umatch-oficial/env-parser/issues", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsc --build src", | ||
"test": "jest", | ||
"lint": "eslint . --ext .ts", | ||
"prepublishOnly": "npm test && npm run lint", | ||
"prepare": "npm run build", | ||
"preversion": "npm run lint", | ||
"postversion": "git push && git push --tags" | ||
}, | ||
"main": "./lib/index.js", | ||
"files": [ | ||
"lib/**/*.d.ts", | ||
"lib/**/*.ts.map", | ||
"lib/**/*.js" | ||
], | ||
"devDependencies": { | ||
"@types/jest": "^29.2.0", | ||
"@types/node": "^18.11.7", | ||
"@typescript-eslint/eslint-plugin": "^5.40.1", | ||
"@typescript-eslint/parser": "^5.40.1", | ||
"eslint": "~8.22.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-import-resolver-typescript": "^3.5.1", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"jest": "^29.2.2", | ||
"prettier": "^2.7.1", | ||
"ts-jest": "^29.0.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.8.4" | ||
}, | ||
"dependencies": { | ||
"@umatch/utils": "^1.10.0" | ||
} | ||
"name": "@umatch/env-parser", | ||
"version": "0.1.0", | ||
"description": "Parse and validate environment variables, with TypeScript support", | ||
"author": "Gabriel Okamoto <gabrielokamoto@hotmail.com>", | ||
"repository": "https://github.com/umatch-oficial/env-parser.git", | ||
"homepage": "https://github.com/umatch-oficial/env-parser#readme", | ||
"bugs": "https://github.com/umatch-oficial/env-parser/issues", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsc --build src", | ||
"test": "jest", | ||
"lint": "eslint . --ext=.ts", | ||
"format": "prettier --check --log-level warn --cache --cache-strategy metadata --config ./.prettierrc.js .", | ||
"prepublishOnly": "pnpm lint && pnpm format && pnpm build && pnpm test", | ||
"prepare": "pnpm build", | ||
"push-publish": "git push --follow-tags && pnpm publish --ignore-scripts", | ||
"release": "pnpm prepublishOnly && pnpm commit-and-tag-version -a" | ||
}, | ||
"main": "./lib/index.js", | ||
"files": [ | ||
"src/**/*.ts", | ||
"lib/**/*.ts", | ||
"lib/**/*.ts.map", | ||
"lib/**/*.js" | ||
], | ||
"devDependencies": { | ||
"@types/jest": "^29.5.11", | ||
"@types/luxon": "^3.3.7", | ||
"@types/node": "^20.10.4", | ||
"@typescript-eslint/eslint-plugin": "^6.14.0", | ||
"@typescript-eslint/parser": "^6.14.0", | ||
"@umatch/eslint-config": "^1.4.1", | ||
"commit-and-tag-version": "^12.0.0", | ||
"eslint": "^8.55.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-import": "^2.29.0", | ||
"jest": "^29.7.0", | ||
"prettier": "~3.0.3", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3" | ||
}, | ||
"dependencies": { | ||
"@umatch/utils": "^12.4.0" | ||
} | ||
} |
Oops, something went wrong.