Speed up lint-deps
slightly
This commit is contained in:
parent
75ea2b0ccb
commit
9a54a8672d
1 changed files with 261 additions and 261 deletions
|
@ -19,7 +19,8 @@ const basePath = join(__dirname, '../../..');
|
||||||
|
|
||||||
const searchPattern = normalizePath(join(basePath, '**/*.{js,ts,tsx}'));
|
const searchPattern = normalizePath(join(basePath, '**/*.{js,ts,tsx}'));
|
||||||
|
|
||||||
const excludedFilesRegexps = [
|
const excludedFilesRegexp = RegExp(
|
||||||
|
[
|
||||||
'^release/',
|
'^release/',
|
||||||
'^preload.bundle.js(LICENSE.txt|map)?',
|
'^preload.bundle.js(LICENSE.txt|map)?',
|
||||||
'^storybook-static/',
|
'^storybook-static/',
|
||||||
|
@ -57,7 +58,6 @@ const excludedFilesRegexps = [
|
||||||
'^libtextsecure/test/test.js',
|
'^libtextsecure/test/test.js',
|
||||||
'^sticker-creator/dist/bundle.js',
|
'^sticker-creator/dist/bundle.js',
|
||||||
'^test/test.js',
|
'^test/test.js',
|
||||||
'^ts/test[^/]*/.+',
|
|
||||||
'^ts/workers/heicConverter.bundle.js',
|
'^ts/workers/heicConverter.bundle.js',
|
||||||
'^ts/sql/mainWorker.bundle.js',
|
'^ts/sql/mainWorker.bundle.js',
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ const excludedFilesRegexps = [
|
||||||
// Test files
|
// Test files
|
||||||
'^libtextsecure/test/.+',
|
'^libtextsecure/test/.+',
|
||||||
'^test/.+',
|
'^test/.+',
|
||||||
|
'^ts/test[^/]*/.+',
|
||||||
|
|
||||||
// Github workflows
|
// Github workflows
|
||||||
'^.github/.+',
|
'^.github/.+',
|
||||||
|
@ -287,7 +288,8 @@ const excludedFilesRegexps = [
|
||||||
'^node_modules/webpack-hot-middleware/.+',
|
'^node_modules/webpack-hot-middleware/.+',
|
||||||
'^node_modules/webpack-merge/.+',
|
'^node_modules/webpack-merge/.+',
|
||||||
'^node_modules/webpack/.+',
|
'^node_modules/webpack/.+',
|
||||||
].map(str => new RegExp(str));
|
].join('|')
|
||||||
|
);
|
||||||
|
|
||||||
function setupRules(allRules: Array<RuleType>) {
|
function setupRules(allRules: Array<RuleType>) {
|
||||||
allRules.forEach((rule: RuleType, index: number) => {
|
allRules.forEach((rule: RuleType, index: number) => {
|
||||||
|
@ -321,9 +323,7 @@ async function main(): Promise<void> {
|
||||||
async (file: string) => {
|
async (file: string) => {
|
||||||
const relativePath = relative(basePath, file).replace(/\\/g, '/');
|
const relativePath = relative(basePath, file).replace(/\\/g, '/');
|
||||||
|
|
||||||
const isFileExcluded = excludedFilesRegexps.some(excludedRegexp =>
|
const isFileExcluded = excludedFilesRegexp.test(relativePath);
|
||||||
excludedRegexp.test(relativePath)
|
|
||||||
);
|
|
||||||
if (isFileExcluded) {
|
if (isFileExcluded) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue