1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-09 23:45:25 +02:00

Set up linter for frontend part

This commit is contained in:
gohabereg 2018-09-03 23:32:10 +03:00
parent 3d99a59493
commit 40cab08392
5 changed files with 13 additions and 6 deletions

View file

@ -1 +1,2 @@
node_modules/
public/dist/

1
.gitignore vendored
View file

@ -68,3 +68,4 @@ db/
# Cache of babel and others
.cache/
.eslintcache

View file

@ -1,8 +1,12 @@
// No inspection for unused var `css` because it's used for css bundle
// eslint-disable-next-line no-unused-vars
import css from '../styles/main.pcss';
module.exports = class Docs {
constructor(){
/**
* @constructor
*/
constructor() {
console.log('CodeX Docs initialized');
}
}
};

View file

@ -5,8 +5,9 @@
"scripts": {
"start": "nodemon ./bin/www",
"test": "mocha --recursive ./test",
"lint": "eslint --fix ./**/*.js",
"build": "webpack ./frontend/js/app.js --o='./public/dist/bundle.js' --output-library=Docs -d"
"lint": "eslint --fix --cache ./**/*.js",
"build": "webpack ./frontend/js/app.js --o='./public/dist/bundle.js' --output-library=Docs -d",
"precommit": "yarn lint && yarn test --exit"
},
"dependencies": {
"body-parser": "latest",

View file

@ -8,7 +8,7 @@ const babelLoader = {
options: {
cacheDirectory: '.cache/babel-loader',
presets: [
"env"
'env'
],
plugins: [
/**