|
| 1 | +/* |
| 2 | +Copyright 2019 Adobe Inc. All rights reserved. |
| 3 | +This file is licensed to you under the Apache License, Version 2.0 (the "License"); |
| 4 | +you may not use this file except in compliance with the License. You may obtain a copy |
| 5 | +of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | +
|
| 7 | +Unless required by applicable law or agreed to in writing, software distributed under |
| 8 | +the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS |
| 9 | +OF ANY KIND, either express or implied. See the License for the specific language |
| 10 | +governing permissions and limitations under the License. |
| 11 | +*/ |
| 12 | + |
| 13 | +const aioConfig = require('@adobe/eslint-config-aio-lib-config') |
| 14 | +const jestPlugin = require('eslint-plugin-jest') |
| 15 | + |
| 16 | +const testGlobals = { |
| 17 | + fixtureFile: 'readonly', |
| 18 | + fixtureFileWithTimeZoneAdjustment: 'readonly', |
| 19 | + fixtureJson: 'readonly', |
| 20 | + fixtureZip: 'readonly', |
| 21 | + fakeFileSystem: 'readonly', |
| 22 | + createTestBaseFlagsFunction: 'readonly', |
| 23 | + createTestFlagsFunction: 'readonly' |
| 24 | +} |
| 25 | + |
| 26 | +module.exports = [ |
| 27 | + ...aioConfig, |
| 28 | + { |
| 29 | + ignores: ['node_modules/**', 'coverage/**'] |
| 30 | + }, |
| 31 | + { |
| 32 | + rules: { |
| 33 | + 'jsdoc/tag-lines': ['error', 'never', { startLines: null }] |
| 34 | + } |
| 35 | + }, |
| 36 | + { |
| 37 | + files: ['test/**/*.js', 'e2e/**/*.js'], |
| 38 | + ...jestPlugin.configs['flat/recommended'], |
| 39 | + languageOptions: { |
| 40 | + globals: { |
| 41 | + ...jestPlugin.configs['flat/recommended'].languageOptions.globals, |
| 42 | + ...testGlobals |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | +] |
0 commit comments