Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@transferwise/eslint-plugin

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transferwise/eslint-plugin - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

CODEOWNERS

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# v0.3.0
## Support ESlint v9
Multiple methods on the `context` object have been removed and replaced by
methods on `SourceCode`. Migrate rules to use these new methods.
# v0.2.2

@@ -2,0 +9,0 @@

4

package.json
{
"name": "@transferwise/eslint-plugin",
"version": "0.2.2",
"version": "0.3.0",
"description": "TransferWise ESLint plugin",

@@ -27,3 +27,3 @@ "main": "./index.js",

"devDependencies": {
"eslint": "^8.38.0",
"eslint": "^9.12.0",
"jest": "^29.5.0",

@@ -30,0 +30,0 @@ "release-to-github-with-changelog": "^1.2.4"

@@ -14,6 +14,8 @@ /**

RuleTester.setDefaultConfig({
parserOptions: {
languageOptions: {
ecmaVersion: 6,
ecmaFeatures: {
jsx: true,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},

@@ -20,0 +22,0 @@ },

@@ -23,3 +23,4 @@ /**

create(context) {
const fileName = context.getFilename();
const sourceCode = context.sourceCode ?? context.getSourceCode();
const filename = context.filename ?? context.getFilename();

@@ -33,3 +34,3 @@ function checkExportedName(node) {

const isInPagesDirectory = fileName.includes('pages');
const isInPagesDirectory = filename.includes('pages');

@@ -55,4 +56,3 @@ if (!isInPagesDirectory) {

} else if (declaration.type === 'VariableDeclaration') {
context
.getDeclaredVariables(declaration)
(sourceCode.getDeclaredVariables ? sourceCode.getDeclaredVariables(declaration, context) : context.getDeclaredVariables())
.map((v) => v.defs.find((d) => d.parent === declaration))

@@ -59,0 +59,0 @@ .map((d) => d.name)

@@ -14,3 +14,3 @@ /**

RuleTester.setDefaultConfig({
parserOptions: {
languageOptions: {
ecmaVersion: 2020,

@@ -17,0 +17,0 @@ sourceType: 'module',

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc