mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
Proper TSLint Extends (#4635)
This commit is contained in:
parent
dbb9963475
commit
c8472a256e
5
.github/CODEOWNERS
vendored
5
.github/CODEOWNERS
vendored
@ -58,7 +58,7 @@
|
||||
/.gitmodules @beyang
|
||||
/.gitattributes @beyang
|
||||
/.yarnrc @felixfbecker
|
||||
/.eslintrc.js @felixfbecker
|
||||
.eslintrc.js @felixfbecker
|
||||
/CHANGELOG.md @beyang
|
||||
/pkg/httputil @beyang
|
||||
/pkg/diskcache @beyang
|
||||
@ -82,7 +82,8 @@
|
||||
/.mailmap @beyang
|
||||
/tsconfig.json @felixfbecker
|
||||
/jest.config.base.js @felixfbecker
|
||||
/tslint.json @felixfbecker
|
||||
tslint.json @felixfbecker
|
||||
tslint.config.js @felixfbecker
|
||||
/enterprise/cmd @beyang
|
||||
/enterprise/pkg @beyang
|
||||
/enterprise @beyang
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": ["../tslint.json"],
|
||||
"extends": ["../tslint.config.js"],
|
||||
"linterOptions": { "exclude": ["node_modules/**", "**/*.json", "coverage/**"] },
|
||||
"rules": {
|
||||
"deprecation": {
|
||||
|
||||
@ -346,7 +346,7 @@ describe('registerHoverContributions()', () => {
|
||||
altAction: undefined,
|
||||
}
|
||||
|
||||
it.only('shows goToDefinition (non-preloaded) when the definition is loading', async () =>
|
||||
it('shows goToDefinition (non-preloaded) when the definition is loading', async () =>
|
||||
expect(
|
||||
getHoverActions({
|
||||
'goToDefinition.showLoading': true,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": ["../tslint.json"],
|
||||
"extends": ["../tslint.config.js"],
|
||||
"linterOptions": { "exclude": ["node_modules/**", "coverage/**"] },
|
||||
"rulesDirectory": "dev/tslint",
|
||||
"rules": {
|
||||
|
||||
30
tslint.config.js
Normal file
30
tslint.config.js
Normal file
@ -0,0 +1,30 @@
|
||||
// @ts-nocheck
|
||||
|
||||
const baseConfig = require('@sourcegraph/tslint-config')
|
||||
|
||||
module.exports = {
|
||||
extends: ['@sourcegraph/tslint-config'],
|
||||
linterOptions: { exclude: ['node_modules/**'] },
|
||||
rules: {
|
||||
'await-promise': false,
|
||||
'import-blacklist': [true, 'highlight.js', 'marked'],
|
||||
ban: [
|
||||
true,
|
||||
...baseConfig.rules.ban,
|
||||
{ name: ['assert', 'strictEqual'], message: 'Use jest matchers instead.' },
|
||||
{ name: ['assert', 'deepStrictEqual'], message: 'Use jest matchers instead.' },
|
||||
{ name: ['test', 'only'], message: "Don't commit 'only' test directives." },
|
||||
],
|
||||
'jsx-ban-elements': [
|
||||
true,
|
||||
[
|
||||
'^form$',
|
||||
'Use the Form component in src/components/Form.tsx instead of the native HTML form element to get proper form validation feedback',
|
||||
],
|
||||
[
|
||||
'^select$',
|
||||
'Use the Select component in src/components/Select.tsx instead of the native HTML select element for proper cross-browser styling',
|
||||
],
|
||||
],
|
||||
},
|
||||
}
|
||||
26
tslint.json
26
tslint.json
@ -1,26 +0,0 @@
|
||||
{
|
||||
"extends": ["@sourcegraph/tslint-config"],
|
||||
"linterOptions": { "exclude": ["node_modules/**"] },
|
||||
"rules": {
|
||||
"await-promise": false,
|
||||
"import-blacklist": [true, "highlight.js", "marked"],
|
||||
"ban": [
|
||||
true,
|
||||
{ "name": ["assert", "strictEqual"], "message": "Use jest matchers instead." },
|
||||
{ "name": ["assert", "deepStrictEqual"], "message": "Use jest matchers instead." },
|
||||
{ "name": ["describe", "only"], "message": "Don't commit 'only' test directives." },
|
||||
{ "name": ["test", "only"], "message": "Don't commit 'only' test directives." }
|
||||
],
|
||||
"jsx-ban-elements": [
|
||||
true,
|
||||
[
|
||||
"^form$",
|
||||
"Use the Form component in src/components/Form.tsx instead of the native HTML form element to get proper form validation feedback"
|
||||
],
|
||||
[
|
||||
"^select$",
|
||||
"Use the Select component in src/components/Select.tsx instead of the native HTML select element for proper cross-browser styling"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"extends": ["../tslint.json"],
|
||||
"extends": ["../tslint.config.js"],
|
||||
"linterOptions": { "exclude": ["node_modules/**", "coverage/**"] },
|
||||
"rules": {
|
||||
"await-promise": false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user