added eslint, set initial version, set repository

This commit is contained in:
Josh Guyette 2024-01-05 13:44:25 -06:00
parent edaf8eab30
commit f135ab372f
2 changed files with 36 additions and 1 deletions

29
.eslintrc.js Normal file
View File

@ -0,0 +1,29 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint"],
rules: {
indent: ["error", 2],
"linebreak-style": ["error", "unix"],
semi: ["error", "always"],
},
};

View File

@ -1,8 +1,12 @@
{ {
"name": "family-friendly", "name": "family-friendly",
"version": "1.0.0", "version": "0.0.1",
"description": "Detect or mask out, bad words in a string", "description": "Detect or mask out, bad words in a string",
"main": "dist/FamilyFriendly.js", "main": "dist/FamilyFriendly.js",
"repository": {
"type": "git",
"url": "https://github.com/nightness/family-friendly"
},
"engines": { "engines": {
"node": "18.x" "node": "18.x"
}, },
@ -28,6 +32,8 @@
"@babel/preset-typescript": "^7.23.3", "@babel/preset-typescript": "^7.23.3",
"@types/jest": "^29.5.11", "@types/jest": "^29.5.11",
"@types/node": "^20.10.6", "@types/node": "^20.10.6",
"@typescript-eslint/eslint-plugin": "^6.17.0",
"@typescript-eslint/parser": "^6.17.0",
"eslint": "^8.56.0", "eslint": "^8.56.0",
"jest": "^29.7.0", "jest": "^29.7.0",
"nodemon": "^3.0.2", "nodemon": "^3.0.2",