mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 01:45:15 +00:00
47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// We use eslint-loader so even warnings are very visible.
|
|
// This is why we prefer to use "WARNING" level for potential errors,
|
|
// and we try not to use "ERROR" level at all.
|
|
|
|
module.exports = {
|
|
plugins: ['jest', 'testing-library'],
|
|
overrides: [
|
|
{
|
|
files: ['**/__tests__/**/*', '**/*.{spec,test}.*'],
|
|
env: {
|
|
'jest/globals': true,
|
|
},
|
|
// A subset of the recommended rules:
|
|
rules: {
|
|
// https://github.com/jest-community/eslint-plugin-jest
|
|
'jest/no-conditional-expect': 'error',
|
|
'jest/no-identical-title': 'error',
|
|
'jest/no-interpolation-in-snapshots': 'error',
|
|
'jest/no-jasmine-globals': 'error',
|
|
'jest/no-jest-import': 'error',
|
|
'jest/no-mocks-import': 'error',
|
|
'jest/valid-describe': 'error',
|
|
'jest/valid-expect': 'error',
|
|
'jest/valid-expect-in-promise': 'error',
|
|
'jest/valid-title': 'warn',
|
|
|
|
// https://github.com/testing-library/eslint-plugin-testing-library
|
|
'testing-library/await-async-query': 'error',
|
|
'testing-library/await-async-utils': 'error',
|
|
'testing-library/no-await-sync-query': 'warn',
|
|
'testing-library/no-dom-import': ['error', 'react'],
|
|
'testing-library/no-wait-for-empty-callback': 'error',
|
|
'testing-library/no-wait-for-snapshot': 'error',
|
|
},
|
|
},
|
|
],
|
|
};
|