Skip to content

Commit bf31991

Browse files
committed
fix eslint
1 parent a8faeea commit bf31991

23 files changed

+53
-44
lines changed

developer-extension/tsconfig.webpack.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
"compilerOptions": {
55
"baseUrl": ".",
6-
"module": "ES6",
6+
"module": "preserve",
77
"target": "esnext",
88
"jsx": "react",
99
"lib": ["ES2022", "DOM"],
1010
"types": ["chrome", "react", "react-dom", "jasmine"],
11-
"skipLibCheck": true
11+
"skipLibCheck": true,
12+
"allowImportingTsExtensions": true,
13+
"noEmit": true
1214
},
1315

14-
"include": ["src"]
16+
"include": ["src", "webpack.config.mts"]
1517
}

eslint-local-rules/disallowEnumExports.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { SymbolFlags } = require('typescript')
1+
import { SymbolFlags } from 'typescript'
22

33
/**
44
* This rule forbids exporting 'enums'. It serves two purposes:
@@ -34,7 +34,7 @@ const { SymbolFlags } = require('typescript')
3434
* [1]: https://www.typescriptlang.org/tsconfig#isolatedModules
3535
* [2]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
3636
*/
37-
module.exports = {
37+
export default {
3838
meta: {
3939
docs: {
4040
description: 'Disallow export of enums.',

eslint-local-rules/disallowGenericUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const path = require('path')
1+
import path from 'path'
22

3-
module.exports = {
3+
export default {
44
meta: {
55
docs: {
66
description: 'Disallow the use of too generic utility file names',

eslint-local-rules/disallowNonScripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
meta: {
33
docs: {
44
description: 'Disallow JS files that are not used as a "script"',

eslint-local-rules/disallowProtectedDirectoryImport.js renamed to eslint-local-rules/disallowProtectedDirectoryImport.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const path = require('path')
22
const { minimatch } = require('minimatch')
3+
34
const resolve = require('eslint-module-utils/resolve').default
45
const moduleVisitor = require('eslint-module-utils/moduleVisitor').default
56
const importType = require('eslint-plugin-import/lib/core/importType').default

eslint-local-rules/disallowSideEffects.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const path = require('path')
1+
import path from 'path'
22

3-
module.exports = {
3+
export default {
44
meta: {
55
docs: {
66
description:
@@ -22,7 +22,7 @@ module.exports = {
2222
},
2323
}
2424

25-
const packagesRoot = path.resolve(__dirname, '..', 'packages')
25+
const packagesRoot = path.resolve(import.meta.dirname, '..', 'packages')
2626

2727
// Those modules are known to have side effects when evaluated
2828
const pathsWithSideEffect = new Set([

eslint-local-rules/disallowSpecImport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
meta: {
33
docs: {
44
description: 'Disallow importing spec file code to avoid to execute the tests from the imported spec file twice',

eslint-local-rules/disallowTestImportExportFromSrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
meta: {
33
docs: {
44
description:

eslint-local-rules/disallowUrlConstructorPatchValues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
meta: {
33
docs: {
44
description: 'Disallow problematic URL constructor patched values.',

eslint-local-rules/disallowZoneJsPatchedValues.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const PROBLEMATIC_IDENTIFIERS = {
1919
removeEventListener: 'Use `addEventListener().stop` from @datadog/browser-core instead',
2020
}
2121

22-
module.exports = {
22+
export default {
2323
meta: {
2424
docs: {
2525
description: 'Disallow problematic ZoneJs patched values.',

0 commit comments

Comments
 (0)