1 | 'use strict'
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | const esSuffix = [
|
7 | '.js',
|
8 | '.jsx',
|
9 | '.ts',
|
10 | '.tsx',
|
11 | '.mjs'
|
12 | ]
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | const cssSuffix = [
|
18 | '.css',
|
19 | '.scss',
|
20 | '.sass',
|
21 | '.less'
|
22 | ]
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | const linterSuffix = {
|
28 | es: esSuffix,
|
29 | style: cssSuffix
|
30 | }
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | const linterConfigFile = [
|
36 |
|
37 | '.eslintrc.js',
|
38 | '.eslintignore',
|
39 |
|
40 |
|
41 | '.stylelintrc.js',
|
42 | '.stylelintignore',
|
43 |
|
44 |
|
45 | '.huskyrc.js',
|
46 |
|
47 |
|
48 | '.commitlintrc.js'
|
49 | ]
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | const 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 |
|
69 | const 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 |
|
78 | module.exports = {
|
79 | linterSuffix,
|
80 | linterConfigFile,
|
81 | defaultIgnore,
|
82 | registryAlias
|
83 | }
|