1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-10 07:55:24 +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/ node_modules/
public/dist/

1
.gitignore vendored
View file

@ -68,3 +68,4 @@ db/
# Cache of babel and others # Cache of babel and others
.cache/ .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'; import css from '../styles/main.pcss';
module.exports = class Docs { module.exports = class Docs {
constructor(){ /**
* @constructor
*/
constructor() {
console.log('CodeX Docs initialized'); console.log('CodeX Docs initialized');
} }
} };

View file

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

View file

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