장준영

feat : 파일 이동 및 린트, 프리티어 적용

1 -module.exports = {
2 - env: {
3 - browser: true,
4 - es2021: true,
5 - node: true,
6 - },
7 - extends: ['eslint:recommended', 'plugin:prettier/recommended'],
8 - parserOptions: {
9 - ecmaVersion: 12,
10 - sourceType: 'module',
11 - },
12 - rules: {
13 - 'prettier/prettier': [
14 - 'error',
15 - { singleQuote: true },
16 - {
17 - endOfLine: 'auto',
18 - },
19 - ],
20 - 'no-unused-vars': 'warn',
21 - 'no-console': 'off',
22 - 'func-names': 'off',
23 - 'no-process-exit': 'off',
24 - 'object-shorthand': 'off',
25 - 'class-methods-use-this': 'off',
26 - },
27 - };
28 -
...\ No newline at end of file ...\ No newline at end of file
1 +{
2 + "env": {
3 + "browser": true,
4 + "es6": true
5 + },
6 + "extends": ["airbnb-base", "plugin:prettier/recommended"],
7 + "parserOptions": {
8 + "ecmaVersion": 6,
9 + "sourceType": "module"
10 + },
11 + "plugins": ["prettier"],
12 + "rules": {
13 + "semi": "error",
14 + "prettier/prettier": [
15 + "error",
16 + {
17 + "endOfLine": "auto"
18 + }
19 + ]
20 + }
21 +}
1 +{
2 + "singleQuote": true,
3 + "semi": true,
4 + "useTabs": false,
5 + "tabWidth": 2,
6 + "trailingComma": "all",
7 + "printWidth": 100,
8 + "endOfLine": "lf"
9 + }
10 +
...\ No newline at end of file ...\ No newline at end of file
...@@ -11,12 +11,18 @@ ...@@ -11,12 +11,18 @@
11 "debug": "~2.6.9", 11 "debug": "~2.6.9",
12 "dotenv": "^8.2.0", 12 "dotenv": "^8.2.0",
13 "express": "~4.16.1", 13 "express": "~4.16.1",
14 + "hangul-js": "^0.2.6",
14 "http-errors": "~1.6.3", 15 "http-errors": "~1.6.3",
15 "jade": "~1.11.0", 16 "jade": "~1.11.0",
16 "morgan": "~1.9.1", 17 "morgan": "~1.9.1",
17 "mysql2": "^2.2.5" 18 "mysql2": "^2.2.5"
18 }, 19 },
19 "devDependencies": { 20 "devDependencies": {
20 - "eslint": "^7.15.0" 21 + "eslint": "^7.15.0",
22 + "eslint-config-airbnb-base": "^14.2.1",
23 + "eslint-config-prettier": "^7.0.0",
24 + "eslint-plugin-import": "^2.22.1",
25 + "eslint-plugin-prettier": "^3.2.0",
26 + "prettier": "^2.2.1"
21 } 27 }
22 } 28 }
......
1 -var express = require('express'); 1 +const express = require('express');
2 -const insertDB = require('../data_json/data_insert'); 2 +
3 -var router = express.Router(); 3 +const router = express.Router();
4 4
5 /* GET home page. */ 5 /* GET home page. */
6 -router.get('/', function(req, res, next) { 6 +router.post('/checkProfanity', (req, res) => {
7 res.send('hello'); 7 res.send('hello');
8 }); 8 });
9 9
......