diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..038a69a --- /dev/null +++ b/.eslintrc.js @@ -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"], + }, +}; diff --git a/package.json b/package.json index e4c612c..964b0d3 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,12 @@ { "name": "family-friendly", - "version": "1.0.0", + "version": "0.0.1", "description": "Detect or mask out, bad words in a string", "main": "dist/FamilyFriendly.js", + "repository": { + "type": "git", + "url": "https://github.com/nightness/family-friendly" + }, "engines": { "node": "18.x" }, @@ -28,6 +32,8 @@ "@babel/preset-typescript": "^7.23.3", "@types/jest": "^29.5.11", "@types/node": "^20.10.6", + "@typescript-eslint/eslint-plugin": "^6.17.0", + "@typescript-eslint/parser": "^6.17.0", "eslint": "^8.56.0", "jest": "^29.7.0", "nodemon": "^3.0.2",