-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESLint Configuration PreCommit format and Test
- Loading branch information
1 parent
b9bd13e
commit 6ed0a57
Showing
9 changed files
with
150 additions
and
47 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ | ||
"root": true, | ||
"extends": ["airbnb-base"], | ||
"env": { | ||
"node": true, | ||
"es6": true, | ||
"mocha": true | ||
}, | ||
"rules": { | ||
"quotes": ["error", "double"], | ||
"one-var": 0, | ||
"one-var-declaration-per-line": 0, | ||
"new-cap": 0, | ||
"no-unused-vars": "off", | ||
"import/no-dynamic-require": "off", | ||
"operator-linebreak": "off", | ||
"arrow-body-style": "off", | ||
"global-require": "off", | ||
"consistent-return": 0, | ||
"no-param-reassign": 0, | ||
"comma-dangle": 0, | ||
"semi": 0, | ||
"curly": ["error", "multi-line"], | ||
"import/no-unresolved": [ | ||
2, | ||
{ "commonjs": true, "amd": true } | ||
], | ||
"no-shadow": [ | ||
"error", | ||
{ "allow": ["req", "res", "err"] } | ||
], | ||
"valid-jsdoc": [ | ||
"error", | ||
{ | ||
"requireReturn": true, | ||
"requireReturnType": true, | ||
"requireParamDescription": false, | ||
"requireReturnDescription": true | ||
} | ||
], | ||
"require-jsdoc": [ | ||
"error", | ||
{ | ||
"require": { | ||
"FunctionDeclaration": true, | ||
"MethodDefinition": true, | ||
"ClassDeclaration": true | ||
} | ||
} | ||
] | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"trailingComma": "all", | ||
"printWidth": 50 | ||
} |
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,3 @@ | ||
{ | ||
"extends": "@thoughtbot/stylelint-config" | ||
} |
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
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,13 @@ | ||
fail_on_violations: true | ||
|
||
scss: | ||
enabled: false | ||
|
||
stylelint: | ||
config_file: .stylelintrc.json | ||
enabled: true | ||
|
||
eslint: | ||
enabled: true | ||
version: 8.57.0 | ||
config_file: .eslintrc |
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,15 +1,15 @@ | ||
import sequelize, { connect } from "./src/config/dbConnection"; | ||
import { env } from "./src/utils/env"; | ||
import app from "./src/utils/server"; | ||
import sequelize, { connect } from "./src/config/dbConnection" | ||
import { env } from "./src/utils/env" | ||
import app from "./src/utils/server" | ||
|
||
app.listen(env.port, async () => { | ||
await connect(); | ||
await connect() | ||
await sequelize | ||
.sync() | ||
.then(() => { | ||
console.log(` db synced and server is running on port ${env.port}`); | ||
console.log(" db synced and server is running") | ||
}) | ||
.catch((error: any) => { | ||
console.log(error.message); | ||
}); | ||
}); | ||
console.log(error.message) | ||
}) | ||
}) |
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
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
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,49 @@ | ||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
await queryInterface.createTable("usersTests", { | ||
id: { | ||
allowNull: false, | ||
autoIncrement: true, | ||
primaryKey: true, | ||
type: Sequelize.INTEGER, | ||
}, | ||
name: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
username: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
email: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
validate: { | ||
isEmail: true, | ||
await queryInterface.createTable( | ||
"usersTests", | ||
{ | ||
id: { | ||
allowNull: false, | ||
autoIncrement: true, | ||
primaryKey: true, | ||
type: Sequelize.INTEGER, | ||
}, | ||
name: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
username: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
email: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
validate: { | ||
isEmail: true, | ||
}, | ||
}, | ||
password: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
createdAt: { | ||
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
updatedAt: { | ||
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
}, | ||
password: { | ||
type: Sequelize.STRING, | ||
allowNull: false, | ||
}, | ||
createdAt: { | ||
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
updatedAt: { | ||
allowNull: false, | ||
type: Sequelize.DATE, | ||
}, | ||
}); | ||
) | ||
}, | ||
|
||
async down(queryInterface, Sequelize) { | ||
await queryInterface.describeTable("usersTests"); | ||
await queryInterface.describeTable( | ||
"usersTests", | ||
) | ||
}, | ||
}; | ||
} |