Skip to content

Commit a252938

Browse files
committed
Merge branch 'main' into joh/swc
2 parents 46bab75 + f62d2c8 commit a252938

File tree

263 files changed

+2028
-2622
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+2028
-2622
lines changed

build/lib/eslint/code-import-patterns.ts renamed to .eslintplugin/code-import-patterns.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import * as eslint from 'eslint';
77
import { TSESTree } from '@typescript-eslint/experimental-utils';
88
import * as path from 'path';
9-
import * as minimatch from 'minimatch';
9+
import minimatch from 'minimatch';
1010
import { createImportRuleListener } from './utils';
1111

12-
const REPO_ROOT = path.normalize(path.join(__dirname, '../../../'));
12+
const REPO_ROOT = path.normalize(path.join(__dirname, '../'));
1313

1414
interface ConditionalPattern {
1515
when?: 'hasBrowser' | 'hasNode' | 'test';
File renamed without changes.

.eslintplugin/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const glob = require('glob');
2+
const path = require('path');
3+
4+
require('ts-node').register({ experimentalResolver: true, transpileOnly: true });
5+
6+
// Re-export all .ts files as rules
7+
const rules = {};
8+
glob.sync(`${__dirname}/*.ts`).forEach((file) => {
9+
rules[path.basename(file, '.ts')] = require(file);
10+
});
11+
12+
exports.rules = rules;

0 commit comments

Comments
 (0)