Skip to content

Commit

Permalink
Linting fixes and TypeScript updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cshawaus committed Sep 23, 2020
1 parent 1fb86d6 commit acaba2a
Show file tree
Hide file tree
Showing 21 changed files with 88 additions and 92 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"css-loader": "^4.3.0",
"cssnano": "^4.1.10",
"eslint-loader": "^4.0.2",
"eslint-plugin-jest": "^24.0.2",
"eslint-plugin-jest": "^23.20.0",
"eslint-webpack-plugin": "^2.1.0",
"exports-loader": "^1.1.0",
"extract-loader": "^5.1.0",
Expand Down Expand Up @@ -146,8 +146,8 @@
"devDependencies": {
"@chrisblossom/eslint-config": "^7.2.2",
"@types/yargs": "^15.0.6",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^3.10.1",
"@typescript-eslint/parser": "^3.10.1",
"cross-env": "^7.0.2",
"eslint": "^7.9.0",
"husky": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cli-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import yargs from 'yargs'

import runtime from '../runtime'

import {
import type {
ComposeConfiguration,
} from '../types'

Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import _set from 'lodash/set'
import webpack from 'webpack'
import { CustomizeRule } from 'webpack-merge/dist/types'

import {
import type {
CommandLineFlags,
Configuration,
Environment,
Expand All @@ -21,7 +21,7 @@ import {
ConfigurationType,
} from './types/enums'

import {
import type {
WebpackConfigurables,
} from './types/webpack'

Expand Down
4 changes: 3 additions & 1 deletion src/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ProjectsConfiguration } from './types'
import type {
ProjectsConfiguration,
} from './types'

export const defaultProjects: ProjectsConfiguration = {
core: {
Expand Down
4 changes: 3 additions & 1 deletion src/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { resolve } from 'path'
import _get from 'lodash/get'
import webpack from 'webpack'

import { Project } from './types'
import type {
Project,
} from './types'

import {
environment,
Expand Down
2 changes: 1 addition & 1 deletion src/features/bootstrap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import webpack from 'webpack'

import {
import type {
DependenciesMap,
} from '../types'

Expand Down
2 changes: 1 addition & 1 deletion src/features/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
FeatureEnvironment,
} from '../types/feature'

import {
import type {
WebpackAliases,
} from '../types/webpack'

Expand Down
2 changes: 1 addition & 1 deletion src/features/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {

import { logger } from '@aem-design/compose-support'

import {
import type {
Environment,
FeatureList,
RuntimeConfiguration,
Expand Down
2 changes: 1 addition & 1 deletion src/features/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import webpack from 'webpack'

import {
import type {
DependenciesMap,
} from '../types'

Expand Down
8 changes: 5 additions & 3 deletions src/features/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import webpack from 'webpack'

import css from '../support/css'

import {
import type {
DependenciesMap,
} from '../types'

import {
import type {
WebpackAliases,
} from '../types/webpack'

Expand All @@ -19,7 +19,9 @@ import {
resolveDependency,
} from '../support/dependencies'

import { DependencyType } from '../types/enums'
import {
DependencyType,
} from '../types/enums'

import Feature from './feature'

Expand Down
7 changes: 5 additions & 2 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Hook, HookType } from './types/enums'

import {
Hook,
HookType,
} from './types/enums'

import type {
Project,
RuntimeEnvironment,
} from './types'
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import MiniCssExtractPlugin from 'mini-css-extract-plugin'
import StyleLintPlugin from 'stylelint-webpack-plugin'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'

import {
import type {
RuntimePaths,
} from '../types'

Expand Down
4 changes: 2 additions & 2 deletions src/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import TerserPlugin from 'terser-webpack-plugin'

import { logger } from '@aem-design/compose-support'

import {
import type {
AEMEnvironment,
ComposeConfiguration,
RuntimeConfiguration,
Expand All @@ -31,7 +31,7 @@ import {
WebpackIgnoredProps
} from './types/enums'

import {
import type {
WebpackConfiguration,
WebpackParserOptions,
} from './types/webpack'
Expand Down
4 changes: 3 additions & 1 deletion src/support/__mocks__/dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { DependenciesMap } from '../../types'
import type {
DependenciesMap,
} from '../../types'

import {
InstallStatus,
Expand Down
2 changes: 1 addition & 1 deletion src/support/css.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sass from 'sass'
import webpack from 'webpack'

import {
import type {
CSSLoaderOptions,
Environment,
RuntimePaths,
Expand Down
2 changes: 1 addition & 1 deletion src/support/dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import _flatten from 'lodash/flatten'

import { logger } from '@aem-design/compose-support'

import {
import type {
DependenciesMap,
} from '../types'

Expand Down
4 changes: 2 additions & 2 deletions src/support/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import xml2js from 'xml2js'

import { getIfUtils, IfUtils, IfUtilsFn } from 'webpack-config-utils'

import {
import type {
ComposeConfiguration,
RuntimeEnvironment,
} from '../types'
Expand All @@ -15,7 +15,7 @@ import {
ConfigurationType,
} from '../types/enums'

import {
import type {
MavenConfig,
SavedMavenConfig,
} from '../types/maven'
Expand Down
4 changes: 2 additions & 2 deletions src/types/feature.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import webpack from 'webpack'

import {
import type {
WebpackAliases,
WebpackConfiguration,
} from './webpack'

import {
import type {
DependenciesMap,
Environment,
RuntimePaths,
Expand Down
6 changes: 3 additions & 3 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import sass from 'sass'
import webpack from 'webpack'
import wds from 'webpack-dev-server'

import {
import type {
ConfigurationType,
DependencyType,
Features,
} from './enums'

import {
import type {
MavenConfig,
MavenConfigMap,
SavedMavenConfig,
} from './maven'

import {
import type {
WebpackConfiguration,
WebpackParserOptions,
} from './webpack'
Expand Down
8 changes: 4 additions & 4 deletions src/types/webpack.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import webpack from 'webpack'
import wds from 'webpack-dev-server'

import {
import type {
WebpackIgnoredProps,
} from './enums'

declare module "webpack" {
interface Configuration {
devServer?: wds.Configuration;
}
interface Configuration {
devServer?: wds.Configuration;
}
}

export type WebpackAliases = webpack.Resolve['alias']
Expand Down
Loading

0 comments on commit acaba2a

Please sign in to comment.