Skip to content

Commit 86552ec

Browse files
authored
Merge pull request #178 from hussainweb/dependabot/npm_and_yarn/linters-d91955b313
chore(deps-dev): bump the linters group across 1 directory with 5 updates
2 parents 46512eb + 39a7a53 commit 86552ec

File tree

7 files changed

+607
-640
lines changed

7 files changed

+607
-640
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 61 deletions
This file was deleted.

__tests__/grumphp.test.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,22 @@ import grumphp from '../src/checks/grumphp'
22
import {expect, test} from '@jest/globals'
33

44
test('it returns defaults', () => {
5-
expect(grumphp({}, 'web')).toEqual([
6-
'grumphp',
7-
'run',
8-
'--no-interaction'
9-
])
5+
expect(grumphp({}, 'web')).toEqual(['grumphp', 'run', '--no-interaction'])
106
})
117

128
test('it handles partial inputs', () => {
139
let command
1410
command = grumphp(
1511
{
16-
testsuite: 'linters',
12+
testsuite: 'linters'
1713
},
1814
'web'
1915
)
2016
expect(command).toContain('--testsuite=linters')
2117

2218
command = grumphp(
2319
{
24-
tasks: [
25-
'phpcs',
26-
'phpmd'
27-
]
20+
tasks: ['phpcs', 'phpmd']
2821
},
2922
'docroot'
3023
)

__tests__/phpstan.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import phpstan from '../src/checks/phpstan'
22
import {expect, test} from '@jest/globals'
33

44
test('it returns defaults', () => {
5-
expect(phpstan({}, 'web')).toEqual([
6-
'phpstan'
7-
])
5+
expect(phpstan({}, 'web')).toEqual(['phpstan'])
86
})
97

108
test('it handles configuration', () => {

eslint.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import eslint from '@eslint/js'
2+
import typescriptEslint from '@typescript-eslint/eslint-plugin'
3+
import tseslint from 'typescript-eslint'
4+
import jest from 'eslint-plugin-jest'
5+
import github from 'eslint-plugin-github'
6+
7+
export default [
8+
...tseslint.config(eslint.configs.recommended, tseslint.configs.recommended),
9+
github.getFlatConfigs().recommended,
10+
{
11+
rules: {
12+
'importPlugin/no-unresolved': 'off'
13+
}
14+
},
15+
...github.getFlatConfigs().typescript,
16+
{
17+
files: ['__tests__/**/*.test.ts'],
18+
plugins: {jest: jest},
19+
languageOptions: {
20+
globals: jest.environments.globals.globals
21+
},
22+
rules: {
23+
'jest/no-disabled-tests': 'warn',
24+
'jest/no-focused-tests': 'error',
25+
'jest/no-identical-title': 'error',
26+
'jest/prefer-to-have-length': 'warn',
27+
'jest/valid-expect': 'error'
28+
}
29+
}
30+
]

0 commit comments

Comments
 (0)