Skip to content

Commit e1e64ab

Browse files
authored
Chores: Update eslint rule (#143)
1 parent c360df5 commit e1e64ab

10 files changed

+15
-10
lines changed

Diff for: .eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ module.exports = {
3131
parser: '@typescript-eslint/parser'
3232
},
3333
rules: {
34-
'@typescript-eslint/no-non-null-assertion': 'off'
34+
'@typescript-eslint/no-non-null-assertion': 'off',
35+
'@typescript-eslint/consistent-type-imports': 'error'
3536
}
3637
}
3738
]

Diff for: lib/types/eslint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { AST as YAMLAST } from 'yaml-eslint-parser'
33
import type { AST as VAST } from 'vue-eslint-parser'
44
import type { VueParserServices } from './vue-parser-services'
55
import type { TokenStore } from './types'
6-
import { SettingsVueI18nLocaleDir } from './settings'
6+
import type { SettingsVueI18nLocaleDir } from './settings'
77

88
export interface Position {
99
/** >= 1 */

Diff for: lib/types/nodes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MaybeNode } from './eslint'
1+
import type { MaybeNode } from './eslint'
22

33
export interface JSXText extends MaybeNode {
44
type: 'JSXText'

Diff for: lib/types/vue-parser-services.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Rule } from 'eslint'
22
import type { RuleContext } from './eslint'
33
import type { AST as VAST } from 'vue-eslint-parser'
44
import type { TokenStore } from './types'
5-
import { VElement } from 'vue-eslint-parser/ast'
5+
import type { VElement } from 'vue-eslint-parser/ast'
66

77
export interface TemplateListener {
88
[key: string]: ((node: never) => void) | undefined

Diff for: lib/utils/cache-function.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* @author Yosuke Ota
44
*/
55

6-
import { CacheLoader, LoadData } from './cache-loader'
6+
import type { LoadData } from './cache-loader'
7+
import { CacheLoader } from './cache-loader'
78

89
/**
910
* This function returns a function that returns the result value that was called for the given function.

Diff for: lib/utils/glob-sync.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
* @author kazuya kawaguchi (a.k.a. kazupon)
66
*/
77

8-
import { GlobSync as Sync, IOptions, IGlobBase } from 'glob'
8+
import type { IOptions, IGlobBase } from 'glob'
9+
import { GlobSync as Sync } from 'glob'
910
import { inherits } from 'util'
1011

1112
const IGNORE = Symbol('ignore')

Diff for: lib/utils/ignored-paths.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
import { existsSync, statSync, readFileSync } from 'fs'
88
import { resolve, dirname, relative, sep } from 'path'
99
import { getRelativePath } from './path-utils'
10-
import ignore, { Ignore } from 'ignore'
10+
import type { Ignore } from 'ignore'
11+
import ignore from 'ignore'
1112
import debugBuilder from 'debug'
1213
const debug = debugBuilder('eslint-plugin-vue-i18n:ignored-paths')
1314

Diff for: scripts/update-docs-index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
*/
66
import { writeFileSync } from 'fs'
77
import { resolve } from 'path'
8-
import { withCategories, RuleInfo } from './lib/rules'
8+
import type { RuleInfo } from './lib/rules'
9+
import { withCategories } from './lib/rules'
910

1011
function toTableRow(rule: RuleInfo) {
1112
const mark = `${rule.recommended ? ':star:' : ''}${

Diff for: tests/lib/rules/key-format-style.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { join } from 'path'
55
import { RuleTester } from 'eslint'
66
import rule = require('../../../lib/rules/key-format-style')
7-
import { SettingsVueI18nLocaleDirObject } from '../../../lib/types'
7+
import type { SettingsVueI18nLocaleDirObject } from '../../../lib/types'
88

99
const vueParser = require.resolve('vue-eslint-parser')
1010
const jsonParser = require.resolve('jsonc-eslint-parser')

Diff for: tests/lib/test-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CLIEngine } from 'eslint'
77
import linter = require('eslint/lib/linter')
88
import base = require('../../lib/configs/base')
99
import plugin = require('../../lib/index')
10-
import { SettingsVueI18nLocaleDir } from '../../lib/types'
10+
import type { SettingsVueI18nLocaleDir } from '../../lib/types'
1111
const { SourceCodeFixer } = linter
1212

1313
function buildBaseConfigPath() {

0 commit comments

Comments
 (0)