Skip to content

Commit

Permalink
style: indent lines with tabs instead of spaces (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
Belco90 committed Aug 19, 2022
1 parent 69485e5 commit 08ac914
Show file tree
Hide file tree
Showing 108 changed files with 15,750 additions and 15,738 deletions.
106 changes: 53 additions & 53 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
{
"env": {
"commonjs": true,
"es6": true,
"node": true,
"jest/globals": true
},
"extends": [
"kentcdodds",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:jest/recommended",
"plugin:jest-formatting/recommended"
],
"plugins": ["@typescript-eslint", "jest", "jest-formatting"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"rules": {
// TS
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-use-before-define": "off",
"env": {
"commonjs": true,
"es6": true,
"node": true,
"jest/globals": true
},
"extends": [
"kentcdodds",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:jest/recommended",
"plugin:jest-formatting/recommended"
],
"plugins": ["@typescript-eslint", "jest", "jest-formatting"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"rules": {
// TS
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-use-before-define": "off",

// ESLint
"max-lines-per-function": "off",
"no-restricted-imports": [
"error",
{
"patterns": ["@typescript-eslint/utils/dist/*"]
}
],
// ESLint
"max-lines-per-function": "off",
"no-restricted-imports": [
"error",
{
"patterns": ["@typescript-eslint/utils/dist/*"]
}
],

// Import
"import/no-import-module-exports": "off",
"import/order": [
"warn",
{
"groups": ["builtin", "external", "parent", "sibling", "index"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
]
}
// Import
"import/no-import-module-exports": "off",
"import/order": [
"warn",
{
"groups": ["builtin", "external", "parent", "sibling", "index"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
]
}
}
8 changes: 0 additions & 8 deletions .lintstagedrc

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
singleQuote: true,
singleQuote: true,
useTabs: true,
};
30 changes: 15 additions & 15 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"pkgRoot": "dist",
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
]
"pkgRoot": "dist",
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
]
}
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ If you wish to run a single test while developing locally, add `only: true` to t

```javascript
valid: [
{
only: true,
code: `...`,
},
{
only: true,
code: `...`,
},
];
```

Expand All @@ -137,9 +137,9 @@ Since the plugin will report differently depending on which Testing Library pack
import { render } from '@testing-library/react';

test('should report invalid render usage', () => {
// the following line is the actual code you needed to test your rule,
// but everything else helps finding edge cases and makes it more robust.
const wrapper = render(<Component />);
// the following line is the actual code you needed to test your rule,
// but everything else helps finding edge cases and makes it more robust.
const wrapper = render(<Component />);
});
```

Expand Down
82 changes: 41 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ Add `testing-library` to the plugins section of your `.eslintrc` configuration f

```json
{
"plugins": ["testing-library"]
"plugins": ["testing-library"]
}
```

Then configure the rules you want to use within `rules` property of your `.eslintrc`:

```json
{
"rules": {
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off"
}
"rules": {
"testing-library/await-async-query": "error",
"testing-library/no-await-sync-query": "error",
"testing-library/no-debugging-utils": "warn",
"testing-library/no-dom-import": "off"
}
}
```

Expand All @@ -88,19 +88,19 @@ Assuming you are using the same pattern for your test files as [Jest by default]
```json5
// .eslintrc
{
// 1) Here we have our usual config which applies to the whole project, so we don't put testing-library preset here.
extends: ['airbnb', 'plugin:prettier/recommended'],

// 2) We load other plugins than eslint-plugin-testing-library globally if we want to.
plugins: ['react-hooks'],

overrides: [
{
// 3) Now we enable eslint-plugin-testing-library rules or preset only for matching testing files!
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
// 1) Here we have our usual config which applies to the whole project, so we don't put testing-library preset here.
extends: ['airbnb', 'plugin:prettier/recommended'],

// 2) We load other plugins than eslint-plugin-testing-library globally if we want to.
plugins: ['react-hooks'],

overrides: [
{
// 3) Now we enable eslint-plugin-testing-library rules or preset only for matching testing files!
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: ['plugin:testing-library/react'],
},
],
}
```

Expand All @@ -118,14 +118,14 @@ Since each one of these configurations is aimed at a particular Testing Library
```json5
// ❌ Don't do this
{
extends: ['plugin:testing-library/dom', 'plugin:testing-library/react'],
extends: ['plugin:testing-library/dom', 'plugin:testing-library/react'],
}
```

```json5
// ✅ Just do this instead
{
extends: ['plugin:testing-library/react'],
extends: ['plugin:testing-library/react'],
}
```

Expand All @@ -138,7 +138,7 @@ To enable this configuration use the `extends` property in your

```json
{
"extends": ["plugin:testing-library/dom"]
"extends": ["plugin:testing-library/dom"]
}
```

Expand All @@ -151,7 +151,7 @@ To enable this configuration use the `extends` property in your

```json
{
"extends": ["plugin:testing-library/angular"]
"extends": ["plugin:testing-library/angular"]
}
```

Expand All @@ -164,7 +164,7 @@ To enable this configuration use the `extends` property in your

```json
{
"extends": ["plugin:testing-library/react"]
"extends": ["plugin:testing-library/react"]
}
```

Expand All @@ -177,7 +177,7 @@ To enable this configuration use the `extends` property in your

```json
{
"extends": ["plugin:testing-library/vue"]
"extends": ["plugin:testing-library/vue"]
}
```

Expand All @@ -190,7 +190,7 @@ To enable this configuration use the `extends` property in your

```json
{
"extends": ["plugin:testing-library/marko"]
"extends": ["plugin:testing-library/marko"]
}
```

Expand Down Expand Up @@ -255,9 +255,9 @@ The name of your custom utility file from where you re-export everything from th
```json5
// .eslintrc
{
settings: {
'testing-library/utils-module': 'my-custom-test-utility-file',
},
settings: {
'testing-library/utils-module': 'my-custom-test-utility-file',
},
}
```

Expand All @@ -270,9 +270,9 @@ A list of function names that are valid as Testing Library custom renders, or `"
```json5
// .eslintrc
{
settings: {
'testing-library/custom-renders': ['display', 'renderWithProviders'],
},
settings: {
'testing-library/custom-renders': ['display', 'renderWithProviders'],
},
}
```

Expand All @@ -285,9 +285,9 @@ A list of query names/patterns that are valid as Testing Library custom queries,
```json5
// .eslintrc
{
settings: {
'testing-library/custom-queries': ['ByIcon', 'getByComplexText'],
},
settings: {
'testing-library/custom-queries': ['ByIcon', 'getByComplexText'],
},
}
```

Expand All @@ -300,11 +300,11 @@ Since each Shared Setting is related to one Aggressive Reporting mechanism, and
```json5
// .eslintrc
{
settings: {
'testing-library/utils-module': 'off',
'testing-library/custom-renders': 'off',
'testing-library/custom-queries': 'off',
},
settings: {
'testing-library/utils-module': 'off',
'testing-library/custom-renders': 'off',
'testing-library/custom-queries': 'off',
},
}
```

Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
extends: ['@commitlint/config-conventional'],
};
Loading

0 comments on commit 08ac914

Please sign in to comment.