Skip to content

Commit 71ef84b

Browse files
authored
Merge pull request #13 from sfdctaka/docUrl
Adding doc url to the rules.
2 parents 5b596ba + a23734e commit 71ef84b

File tree

39 files changed

+196
-441
lines changed

39 files changed

+196
-441
lines changed
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;

lib/rules/no-eval-usage.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
/*
2-
* Copyright (c) 2022, salesforce.com, inc.
2+
* Copyright (c) 2023, salesforce.com, inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
77

88
'use strict';
99

10-
const { analyzeLWC } = require('../util/helper');
10+
const { createRule } = require('../util/createRule');
11+
const ruleDefinition = createRule(__filename);
1112

12-
module.exports = {
13-
meta: {
14-
type: 'problem',
15-
schema: []
16-
},
17-
create: function (context) {
18-
analyzeLWC(context, __filename);
19-
return {};
20-
}
21-
};
13+
module.exports = ruleDefinition;

0 commit comments

Comments
 (0)