UNPKG

1.22 kBJavaScriptView Raw
1'use strict'
2
3/**
4 * 支持的 js, ts 文件后缀
5 */
6const esSuffix = [
7 '.js',
8 '.jsx',
9 '.ts',
10 '.tsx',
11 '.mjs'
12]
13
14/**
15 * 支持的 css 文件后缀
16 */
17const cssSuffix = [
18 '.css',
19 '.scss',
20 '.sass',
21 '.less'
22]
23
24/**
25 * 支持的 linter
26 */
27const linterSuffix = {
28 es: esSuffix,
29 style: cssSuffix
30}
31
32/**
33 * 支持的配置文件
34 */
35const linterConfigFile = [
36 // eslint
37 '.eslintrc.js',
38 '.eslintignore',
39
40 // stylelint
41 '.stylelintrc.js',
42 '.stylelintignore',
43
44 // husky
45 '.huskyrc.js',
46
47 // commitlint
48 '.commitlintrc.js'
49]
50
51/**
52 * 默认忽略
53 */
54const defaultIgnore = [
55 '**/node_modules/**',
56 '**/bower_components/**',
57 '**/flow-typed/**',
58 '**/.nyc_output/**',
59 '**/coverage/**',
60 '**/.git',
61 '**/*.min.js',
62 '**/*.min.css',
63 '.eslintrc.js',
64 '.stylelintrc.js',
65 '.huskyrc.js',
66 '.commitlintrc.js'
67]
68
69const registryAlias = {
70 npm: 'https://registry.npmjs.org/',
71 cnpm: 'http://r.cnpmjs.org/',
72 taobao: 'https://registry.npm.taobao.org/',
73 nj: 'https://registry.nodejitsu.com/',
74 rednpm: 'http://registry.mirror.cqupt.edu.cn',
75 skimdb: 'https://skimdb.npmjs.com/registry'
76}
77
78module.exports = {
79 linterSuffix,
80 linterConfigFile,
81 defaultIgnore,
82 registryAlias
83}