Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more prevent-abbreviations replacements and whitelist #464

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 19 additions & 1 deletion rules/prevent-abbreviations.js
Expand Up @@ -86,6 +86,9 @@ const defaultReplacements = {
env: {
environment: true
},
envs: {
environments: true
},
err: {
error: true
},
Expand Down Expand Up @@ -182,6 +185,9 @@ const defaultReplacements = {
temp: {
temporary: true
},
tit: {
title: true
},
tmp: {
temporary: true
},
Expand All @@ -199,7 +205,19 @@ const defaultWhitelist = {
defaultProps: true,
// React.Component static method
// https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops
getDerivedStateFromProps: true
getDerivedStateFromProps: true,
// Ember class name
// https://api.emberjs.com/ember/3.10/classes/Ember.EmberENV/properties
EmberENV: true,
// `package.json` field
// https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
devDependencies: true,
// Jest configuration
// https://jestjs.io/docs/en/configuration#setupfilesafterenv-array
setupFilesAfterEnv: true,
// Next.js function
// https://nextjs.org/learn/basics/fetching-data-for-pages
getInitialProps: true
};

const prepareOptions = ({
Expand Down