Skip to content

Commit

Permalink
chore(eslint): Add eslint to eslint plugin (#4537)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Feb 11, 2022
1 parent 9c01a5e commit 487945f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 26 deletions.
3 changes: 3 additions & 0 deletions packages/eslint-plugin-sdk/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['../../.eslintrc.js'],
};
8 changes: 6 additions & 2 deletions packages/eslint-plugin-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
},
"scripts": {
"link:yarn": "yarn link",
"lint": "prettier --check \"{src,test}/**/*.js\"",
"fix": "prettier --write \"{src,test}/**/*.js\"",
"fix": "run-s fix:eslint fix:prettier",
"fix:eslint": "eslint . --format stylish --fix",
"fix:prettier": "prettier --write \"{src,test}/**/*.js\"",
"lint": "run-s lint:prettier lint:eslint",
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
"lint:prettier": "prettier --check \"{src,test}/**/*.js\"",
"test": "mocha test --recursive",
"pack": "npm pack",
"circularDepCheck": "madge --circular src/index.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin-sdk/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/
'use strict';

//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// Plugin Definition
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

module.exports = {
rules: {
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-plugin-sdk/src/rules/no-async-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/
'use strict';

//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

module.exports = {
meta: {
Expand All @@ -22,15 +22,15 @@ module.exports = {
create: function (context) {
// variables should be defined here

//----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Helpers
//----------------------------------------------------------------------
// ----------------------------------------------------------------------

// any helper functions should go here or else delete this section

//----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Public
//----------------------------------------------------------------------
// ----------------------------------------------------------------------

return {
FunctionDeclaration(node) {
Expand Down
12 changes: 6 additions & 6 deletions packages/eslint-plugin-sdk/src/rules/no-eq-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/
'use strict';

//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

module.exports = {
meta: {
Expand All @@ -25,15 +25,15 @@ module.exports = {
create: function (context) {
// variables should be defined here

//----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Helpers
//----------------------------------------------------------------------
// ----------------------------------------------------------------------

// any helper functions should go here or else delete this section

//----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Public
//----------------------------------------------------------------------
// ----------------------------------------------------------------------

return {
BinaryExpression(node) {
Expand Down
11 changes: 6 additions & 5 deletions packages/eslint-plugin-sdk/test/lib/rules/no-async-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
*/
'use strict';

//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

const rule = require('../../../src/rules/no-async-await');
const RuleTester = require('eslint').RuleTester;

//------------------------------------------------------------------------------
const rule = require('../../../src/rules/no-async-await');

// ------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

RuleTester.setDefaultConfig({
parserOptions: {
Expand Down
11 changes: 6 additions & 5 deletions packages/eslint-plugin-sdk/test/lib/rules/no-eq-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
*/
'use strict';

//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

const rule = require('../../../src/rules/no-eq-empty');
const RuleTester = require('eslint').RuleTester;

//------------------------------------------------------------------------------
const rule = require('../../../src/rules/no-eq-empty');

// ------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------

RuleTester.setDefaultConfig({
parserOptions: {
Expand Down

0 comments on commit 487945f

Please sign in to comment.