Remove eslint from the marko-cli project

This commit is contained in:
igor-dv 2018-06-11 14:21:40 +03:00
parent 86ea3168be
commit 56d030ebc3
4 changed files with 5 additions and 24 deletions

View File

@ -51,7 +51,6 @@ module.exports = {
ts: 'never',
},
],
'import/no-unresolved': ignore,
'import/no-extraneous-dependencies': [
error,
{

View File

@ -11,29 +11,12 @@
"scripts": {
"build": "NODE_ENV=production marko-starter build",
"build-storybook": "build-storybook",
"lint": "eslint src/",
"serve-static": "NODE_ENV=production marko-starter serve-static",
"start": "marko-starter server",
"storybook": "start-storybook -p 9005",
"test": "npm run lint",
"prettier": "prettier src/**/*.{js,css,less} *.js --write"
},
"eslintConfig": {
"env": {
"browser": true,
"node": true
},
"extends": [
"eslint:recommended",
"prettier"
],
"rules": {
"no-console": "off"
}
},
"eslintIgnore": [
"*.marko.js"
],
"dependencies": {
"marko": "^4.10.0",
"marko-starter": "^1.0.0",
@ -47,9 +30,6 @@
"@storybook/addons": "4.0.0-alpha.9",
"@storybook/marko": "4.0.0-alpha.9",
"babel-core": "^6.26.0",
"eslint": "^4.2.0",
"eslint-config-prettier": "^2.3.0",
"eslint-plugin-prettier": "^2.1.2",
"prettier": "^1.13.4",
"webpack": "^4.10.2"
}

View File

@ -9,7 +9,7 @@ function getInitialState(input) {
function getTemplateData(state, input) {
const priority = input.priority || 'primary';
let classes = ['btn'];
const classes = ['btn'];
if (priority === 'primary' || priority === 'danger') {
classes.push(`btn--${priority}`);
@ -25,6 +25,7 @@ function getTemplateData(state, input) {
function handleClick() {
if (!this.state.disabled) {
// eslint-disable-next-line no-undef,no-alert
alert('button-click');
}
}

View File

@ -1,13 +1,14 @@
module.exports = require('marko-widgets').defineComponent({
// eslint-disable-next-line global-require
template: require('./template.marko'),
getTemplateData: function(state, input) {
getTemplateData(state, input) {
return {
name: input.name,
};
},
handleClick: function() {
handleClick() {
this.el.style.backgroundColor = 'yellow';
},
});