eslint-plugin-mint-tracker
v1.2.0
Published
Eslint Plugin for Identifying Mint and Non-Mint Token Usage in React Native Applications
Downloads
6,110
Maintainers
Readme
eslint-plugin-mint-tracker
Custom ESLint plugin to track the use of mint and non-mint tokens within React/React Native codebases.
Installation
You will first need to install eslint package
npm i eslint --save-dev
Next, install eslint-plugin-mint-tracker
:
npm i eslint-plugin-mint-tracker --save-dev
Usage
Use the ESLint's programmatic API with Node.js as follows:
const overrideConfig = {
extends: ["@react-native-community"],
plugins: ["mint-tracker"],
rules: {
"mint-tracker/detect-token-usage": "warn",
},
};
const eslint = new ESLint({
overrideConfig,
useEslintrc: false,
});
const results = await eslint.lintFiles("<some-folder-path>");
The token information will be located in the messages object within the files inside in the results object.