Skip to content

Commit

Permalink
Rough draft of apex rule.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfdctaka committed May 6, 2024
1 parent c6516ad commit 67e3236
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions lib/rules/apex/import-apex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2024, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/

'use strict';

// TODO: This sample rule would be removed.
// The import-apex rule definition
module.exports = {
meta: {
type: 'problem',
docs: {
description:
"Importing apex modules can have issue for offline."
},
fixable: 'code',
schema: []
},
create(context) {
return {
ImportDeclaration(node) {
if (node.source.includes('apex')) {
context.report({
node,
message:
'Watch out for importing apex!'
});
}
}
};
}
};

0 comments on commit 67e3236

Please sign in to comment.