Skip to content

Commit

Permalink
chore(npm): update eslint...
Browse files Browse the repository at this point in the history
  • Loading branch information
akameco committed Feb 14, 2018
1 parent 3af67cb commit 45d2922
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 130 deletions.
2 changes: 1 addition & 1 deletion examples/shopping-cart/package.json
Expand Up @@ -13,7 +13,7 @@
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-scripts": "1.1.0",
"react-scripts": "1.1.1",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -36,19 +36,19 @@
"devDependencies": {
"all-contributors-cli": "^4.10.1",
"babel-cli": "^6.26.0",
"babel-jest": "^22.2.0",
"babel-jest": "^22.2.2",
"babel-log": "^2.0.0",
"babel-plugin-tester": "^5.0.0",
"babel-preset-env": "^1.6.1",
"babel-preset-flow": "^6.23.0",
"babel-preset-stage-2": "^6.24.1",
"coveralls": "^3.0.0",
"eslint": "^4.17.0",
"eslint-config-precure": "^2.0.0",
"eslint-config-precure": "^2.3.0",
"flow-bin": "^0.65.0",
"globby": "^7.1.1",
"husky": "^0.14.3",
"jest": "^22.2.0",
"jest": "^22.3.0",
"jest-in-case": "^1.0.2",
"lerna": "^2.8.0",
"lint-staged": "^6.1.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/s2s-cli/bin/s2s.js
Expand Up @@ -2,8 +2,7 @@
/* eslint flowtype/require-valid-file-annotation: 0 */
'use strict'

// eslint-disable-next-line
if (process.env.NODE_ENV == null) {
if (!process.env.NODE_ENV) {
process.env.NODE_ENV = 'development'
}

Expand Down
2 changes: 1 addition & 1 deletion packages/s2s-cli/src/cli/index.js
@@ -1,5 +1,5 @@
// @flow
import s2s from '../'
import s2s from '..'
import loadConfig from './loadConfig'

export default function run() {
Expand Down
6 changes: 4 additions & 2 deletions packages/s2s-cli/src/cli/loadConfig.js
Expand Up @@ -5,11 +5,13 @@ import type { Config } from 'types'
const S2S_CONFIG_JS = 's2s.config.js'

export default function loadConfig(cwd: string = process.cwd()): Config {
const fp = findUp.sync(S2S_CONFIG_JS, { cwd })
const fp = findUp.sync(S2S_CONFIG_JS, {
cwd,
})
if (!fp) {
throw new Error(`required ${S2S_CONFIG_JS}`)
}
// $FlowFixMe
const configModule = require(fp) // eslint-disable-line
const configModule = require(fp) // eslint-disable-line global-require,import/no-dynamic-require
return configModule
}
2 changes: 1 addition & 1 deletion packages/s2s-cli/src/handlers/handle-plugin.js
Expand Up @@ -9,7 +9,7 @@ import {
resolveInputPath,
} from '../utils'
import runHooks from '../hooks'
import { formatText } from '../reporters/'
import { formatText } from '../reporters'

type Opts = {
eventPath: Path,
Expand Down
2 changes: 1 addition & 1 deletion packages/s2s-cli/src/index.js
@@ -1,5 +1,5 @@
// @flow
import 'babel-polyfill' // eslint-disable-line
import 'babel-polyfill' // eslint-disable-line import/no-unassigned-import
import chalk from 'chalk'
import chokidar from 'chokidar'
import prettierHook from 's2s-hook-prettier'
Expand Down
2 changes: 1 addition & 1 deletion packages/s2s-handler-babel-next/src/index.js
Expand Up @@ -3,7 +3,7 @@ import { transform } from '@babel/core'
import { getPluginName } from 's2s-helper-get-plugin-name'
import type { Handler } from 'types'

// eslint-disable-next-line
// eslint-disable-next-line flowtype/no-weak-types
export type Opts = string | Function | [string | Function, Object]

export default ((code, { eventPath, plugin, filename }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/s2s-handler-typescript/src/index.js
Expand Up @@ -4,7 +4,7 @@ import { getPluginName } from 's2s-helper-get-plugin-name'
import tsSyntax from '@babel/plugin-syntax-typescript'
import type { Handler } from 'types'

// eslint-disable-next-line
// eslint-disable-next-line flowtype/no-weak-types
export type Opts = string | Function | [string | Function, Object]

export default ((code, { eventPath, plugin, filename }) => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/build.js
Expand Up @@ -68,7 +68,7 @@ function build() {

const files = process.argv.slice(2)

if (files.length) {
if (files.length > 0) {
files.forEach(buildFile)
} else {
process.stdout.write(chalk.bold.inverse(' Clean Building Files... \n'))
Expand Down
2 changes: 1 addition & 1 deletion scripts/watch.js
Expand Up @@ -47,7 +47,7 @@ getPkgs().forEach(p => {

setInterval(() => {
const files = Array.from(filesToBuild.keys())
if (files.length) {
if (files.length > 0) {
filesToBuild = new Map()
try {
execSync(`${BUILD_CMD} ${files.join(' ')}`, { stdio: [0, 1, 2] })
Expand Down
4 changes: 2 additions & 2 deletions types/babel.js
Expand Up @@ -12,9 +12,9 @@ export type BabelPath = {
get(key: string): BabelNode,
}

export type File = Object // eslint-disable-line
export type File = Object // eslint-disable-line flowtype/no-weak-types

export type State = {
opts: Object, // eslint-disable-line
opts: Object, // eslint-disable-line flowtype/no-weak-types
file: File,
}
8 changes: 4 additions & 4 deletions types/index.js
Expand Up @@ -10,7 +10,7 @@ export type AnymatchPath = RegExp | string | (RegExp | string)[]
export type HandlerOpts = {
eventPath: Path,
filename: Path,
// eslint-disable-next-line
// eslint-disable-next-line no-use-before-define
plugin?: Plugin,
}

Expand Down Expand Up @@ -47,10 +47,10 @@ export type AfterHook = (code: Code, path: Path) => Code
*/
export type Config = {
watch: Path, // file, dir, glob, or array
plugins?: Plugin[], // eslint-disable-line
plugins?: Plugin[],
templatesDir?: string,
templates?: Template[], // eslint-disable-line
afterHooks?: AfterHook[], // eslint-disable-line
templates?: Template[],
afterHooks?: AfterHook[],
prettier: boolean,
handlerMapper?: { [extensions: string]: Handler },
ignored?: AnymatchPath, // file, dir, glob, regexp, or array
Expand Down

0 comments on commit 45d2922

Please sign in to comment.