mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-17 05:02:23 +08:00
Remove eslint from the marko-cli project
This commit is contained in:
parent
86ea3168be
commit
56d030ebc3
@ -51,7 +51,6 @@ module.exports = {
|
||||
ts: 'never',
|
||||
},
|
||||
],
|
||||
'import/no-unresolved': ignore,
|
||||
'import/no-extraneous-dependencies': [
|
||||
error,
|
||||
{
|
||||
|
@ -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"
|
||||
}
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
@ -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';
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user