From 17cf7ae931185d8ab1ac1e4f8b7042677e03db8d Mon Sep 17 00:00:00 2001 From: "Shahar Or (mightyiam)" Date: Thu, 18 Jun 2020 16:47:08 +0700 Subject: [PATCH] ux(docs): enable eslint rule import/first --- .eslintrc.cjs | 1 - README.md | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a3d5d6a..90f0bed 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -17,7 +17,6 @@ module.exports = { { files: ['**/*.md/*.@(mjs|ts)'], rules: { - 'import/first': 'off', 'import/newline-after-import': 'off', 'key-spacing': 'off', 'max-statements-per-line': 'off', diff --git a/README.md b/README.md index aef25fb..a71be34 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ import clazz from 'snabbdom/modules/class'; import props from 'snabbdom/modules/props'; import style from 'snabbdom/modules/style'; import listeners from 'snabbdom/modules/eventlisteners'; +import h from 'snabbdom/h'; // helper function for creating vnodes var patch = init([ // Init patch function with chosen modules clazz, // makes it easy to toggle classes @@ -70,7 +71,6 @@ var patch = init([ // Init patch function with chosen modules style, // handles styling on elements with support for animations listeners, // attaches event listeners ]); -import h from 'snabbdom/h'; // helper function for creating vnodes var container = document.getElementById('container'); @@ -215,14 +215,14 @@ import clazz from 'snabbdom/modules/class'; import props from 'snabbdom/modules/props'; import style from 'snabbdom/modules/style'; import listeners from 'snabbdom/modules/eventlisteners'; +import h from 'snabbdom/h'; // helper function for creating vnodes +import toVNode from 'snabbdom/tovnode'; var patch = init([ // Init patch function with chosen modules clazz, // makes it easy to toggle classes props, // for setting properties on DOM elements style, // handles styling on elements with support for animations listeners, // attaches event listeners ]); -import h from 'snabbdom/h'; // helper function for creating vnodes -import toVNode from 'snabbdom/tovnode'; var newVNode = h('div', {style: {color: '#000'}}, [ h('h1', 'Headline'),