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 excludedFilesRegexps = [
|
||||
const excludedFilesRegexp = RegExp(
|
||||
[
|
||||
'^release/',
|
||||
'^preload.bundle.js(LICENSE.txt|map)?',
|
||||
'^storybook-static/',
|
||||
|
@ -57,7 +58,6 @@ const excludedFilesRegexps = [
|
|||
'^libtextsecure/test/test.js',
|
||||
'^sticker-creator/dist/bundle.js',
|
||||
'^test/test.js',
|
||||
'^ts/test[^/]*/.+',
|
||||
'^ts/workers/heicConverter.bundle.js',
|
||||
'^ts/sql/mainWorker.bundle.js',
|
||||
|
||||
|
@ -67,6 +67,7 @@ const excludedFilesRegexps = [
|
|||
// Test files
|
||||
'^libtextsecure/test/.+',
|
||||
'^test/.+',
|
||||
'^ts/test[^/]*/.+',
|
||||
|
||||
// Github workflows
|
||||
'^.github/.+',
|
||||
|
@ -287,7 +288,8 @@ const excludedFilesRegexps = [
|
|||
'^node_modules/webpack-hot-middleware/.+',
|
||||
'^node_modules/webpack-merge/.+',
|
||||
'^node_modules/webpack/.+',
|
||||
].map(str => new RegExp(str));
|
||||
].join('|')
|
||||
);
|
||||
|
||||
function setupRules(allRules: Array<RuleType>) {
|
||||
allRules.forEach((rule: RuleType, index: number) => {
|
||||
|
@ -321,9 +323,7 @@ async function main(): Promise<void> {
|
|||
async (file: string) => {
|
||||
const relativePath = relative(basePath, file).replace(/\\/g, '/');
|
||||
|
||||
const isFileExcluded = excludedFilesRegexps.some(excludedRegexp =>
|
||||
excludedRegexp.test(relativePath)
|
||||
);
|
||||
const isFileExcluded = excludedFilesRegexp.test(relativePath);
|
||||
if (isFileExcluded) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue