File tree 5 files changed +25
-10
lines changed
eslint-config-algolia/flat
5 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable import/no-commonjs */
2
2
const jestPlugin = require ( 'eslint-plugin-jest' ) ;
3
- const globals = require ( 'globals' ) ;
4
3
5
4
const jestRules = require ( '../rules/jest' ) ;
6
5
7
6
module . exports = [
8
- jestRules ,
9
7
{
10
8
...jestPlugin . configs [ 'flat/recommended' ] ,
9
+ } ,
10
+ {
11
11
...jestPlugin . configs [ 'flat/style' ] ,
12
- languageOptions : {
13
- globals : {
14
- ...globals . jest ,
15
- } ,
16
- } ,
17
12
} ,
13
+ jestRules ,
18
14
] ;
Original file line number Diff line number Diff line change @@ -15,5 +15,8 @@ module.exports = [
15
15
project : 'tsconfig.json' ,
16
16
} ,
17
17
} ,
18
+ linterOptions : {
19
+ reportUnusedDisableDirectives : 'error' ,
20
+ } ,
18
21
} ,
19
22
] ;
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ export default function connect(mapStateToProps) {
30
30
}
31
31
}
32
32
33
- // eslint-disable-next-line camelcase
34
33
UNSAFE_componentWillReceiveProps ( nextProps ) {
35
34
this . setState ( mapStateToProps ( this . context . algoliaStore . getState ( ) , nextProps ) ) ;
36
35
}
Original file line number Diff line number Diff line change
1
+ describe ( 'simple tests' , ( ) => {
2
+ // Test a rule from the Algolia config
3
+ // eslint-disable-next-line jest/consistent-test-it
4
+ test ( 'should do simple maths' , ( ) => {
5
+ expect ( Math . pow ( 2 , 8 ) ) . toBe ( 256 ) ;
6
+ } ) ;
7
+
8
+ // Test a rule from the recommended config (https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-commented-out-tests.md)
9
+ // eslint-disable-next-line jest/no-commented-out-tests
10
+ // it('foo', () => {});
11
+
12
+ it ( 'should do simple comparison' , ( ) => {
13
+ // Test a rule from the style config (https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-be.md)
14
+ // eslint-disable-next-line jest/prefer-to-be
15
+ expect ( 0 ) . toEqual ( 0 ) ;
16
+ } ) ;
17
+ } ) ;
Original file line number Diff line number Diff line change @@ -2861,12 +2861,12 @@ __metadata:
2861
2861
2862
2862
" eslint-config-algolia@file:../eslint-config-algolia::locator=test%40workspace%3Apackages%2Ftest " :
2863
2863
version : 23.2.0
2864
- resolution : " eslint-config-algolia@file:../eslint-config-algolia#../eslint-config-algolia::hash=792dff &locator=test%40workspace%3Apackages%2Ftest"
2864
+ resolution : " eslint-config-algolia@file:../eslint-config-algolia#../eslint-config-algolia::hash=5dc416 &locator=test%40workspace%3Apackages%2Ftest"
2865
2865
peerDependencies :
2866
2866
" @stylistic/eslint-plugin " : ^2.6.4
2867
2867
eslint : ^5.16.0 || ^6.8.0 || ^7.2.0 || ^8.0.0 || ^9.0.0
2868
2868
prettier : ^3.0.0
2869
- checksum : 10c0/d01694d1a43cfce890f3f5b6dccad74e1e8ef5714f2a820d7f44caa6f8c36d58d51d33979a019d3dfcbc4c4bea272f3ab1b96a9d51f161e318c15380065dccd4
2869
+ checksum : 10c0/a9d3f9824735bfa89570b1bb4ad1df4027ca0f4cba977edb376ad4a812253560a26a94c2c05cfef3ec4ce8d3bb16385ff91e7cf156e1b651396eed25ec3d3399
2870
2870
languageName : node
2871
2871
linkType : hard
2872
2872
You can’t perform that action at this time.
0 commit comments