mirror of
https://gitee.com/ShopeX/ECShopX
synced 2026-08-08 12:55:32 +08:00
4.4.0
This commit is contained in:
20
tdd-guard/test/artifacts/javascript/eslint.config.js
Normal file
20
tdd-guard/test/artifacts/javascript/eslint.config.js
Normal file
@@ -0,0 +1,20 @@
|
||||
module.exports = [
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
rules: {
|
||||
'no-unused-vars': 'error',
|
||||
'no-var': 'error',
|
||||
'semi': ['error', 'always'],
|
||||
'quotes': ['error', 'single'],
|
||||
'no-duplicate-string': 'off',
|
||||
'max-params': ['error', 5]
|
||||
},
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module'
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: ['node_modules/**', 'dist/**', 'coverage/**']
|
||||
}
|
||||
];
|
||||
12
tdd-guard/test/artifacts/javascript/file-with-issues.js
Normal file
12
tdd-guard/test/artifacts/javascript/file-with-issues.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// This file has intentional lint issues for testing
|
||||
var unusedVariable = 5;
|
||||
console.log("hello")
|
||||
console.log("hello")
|
||||
console.log("hello")
|
||||
|
||||
function tooManyParams(a, b, c, d, e, f) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
var x = 1
|
||||
var y = 2
|
||||
10
tdd-guard/test/artifacts/javascript/file-without-issues.js
Normal file
10
tdd-guard/test/artifacts/javascript/file-without-issues.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// This file has no lint issues
|
||||
const greeting = 'hello';
|
||||
console.log(greeting);
|
||||
|
||||
function add(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
const result = add(1, 2);
|
||||
console.log(result);
|
||||
Reference in New Issue
Block a user