Giter Club home page Giter Club logo

telus-standard's Introduction

maintenance-status npm

TELUS Standard

Standard for TELUS Digital

telus-standard is inspired by standard but with TELUS specific linting and a11y rules.

For more information please see standard.js.

Install

npm install @telus/telus-standard --save-dev

Usage

You can manually run telus-standard from your project repo:

./node_modules/.bin/telus-standard

You can also add telus-standard to your package.json scripts:

{
  "scripts": {
    "lint": "telus-standard --verbose",
    "lint:fix": "telus-standard --verbose --fix",
  }
}

Migrating from @telus/eslint-config

  1. Remove unnecessary packages

    npm rm @telus/eslint-config \
      eslint-config-airbnb \
      eslint-config-prettier \
      eslint-plugin-import \
      eslint-plugin-jest \
      eslint-plugin-jsx-a11y \
      eslint-plugin-react
  2. Install telus-standard

    npm i --save-dev @telus/telus-standard
  3. Update or add the these scripts in your package.json

    {
      "scripts": {
        "lint": "telus-standard --verbose",
        "lint:fix": "telus-standard --verbose --fix",
      }
    }
  4. Run the lint command

    npm run lint

Removing eslint-loader

telus-standard does not work with eslint-loader. If you are unaware, eslint-loader runs in your webpack pipeline so that eslint rules are forced to run prior to the application working.

eslint-loader has been removed from telus-isomorphic-starter-kit, you can read more about the decision from the Pull Request.

  1. Remove the package:
    npm rm eslint-loader
  2. Remove references to the package in your project:
        rules: [
    -      {
    -        test: /\.(js|jsx)$/,
    -        enforce: 'pre',
    -        use: ['eslint-loader'],
    -        include: path.join(__dirname, 'src')
    -      },
           {

Github: @telusΒ β€’ Twitter: @telusdigital

telus-standard's People

Contributors

afzal-telus avatar ankushchourasia avatar billxinli avatar codyzu avatar foxted avatar harish-chandra-89 avatar mattcan avatar matthew-telus avatar mattseburn avatar maumercado avatar mp-architech avatar nateaxcell avatar naveen-gupta1 avatar nitin-telus avatar rgupta1729 avatar ruxandrafed avatar shubhamtyagi02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telus-standard's Issues

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Invalid npm token.

The npm token configured in the NPM_TOKEN environment variable must be a valid token allowing to publish to the registry https://registry.npmjs.org/.

If you are using Two Factor Authentication for your account, set its level to "Authorization only" in your account settings. semantic-release cannot publish with the default "
Authorization and writes" level.

Please make sure to set the NPM_TOKEN environment variable in your CI with the exact value of the npm token.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yaml
  • actions/checkout v2
  • actions/setup-node v2
.github/workflows/publish.yaml
  • actions/checkout v2
  • actions/setup-node v2
npm
package.json
  • @babel/core ^7.20.5
  • @babel/eslint-parser ^7.19.1
  • babel-preset-airbnb ^5.0.0
  • eslint ^7.32.0
  • eslint-config-airbnb ^18.2.1
  • eslint-config-prettier ^8.5.0
  • eslint-plugin-import ^2.27.5
  • eslint-plugin-jest ^26.9.0
  • eslint-plugin-jsx-a11y ^6.6.0
  • eslint-plugin-react ^7.31.11
  • eslint-plugin-react-hooks ^4.6.0
  • npm-run-all ^4.1.5
  • standard-engine ^14.0.1
  • @commitlint/cli ^17.3.0
  • @commitlint/config-angular ^17.3.0
  • @telus/remark-config ^2.2.5
  • @telus/semantic-release-config ^2.3.0
  • cross-spawn ^7.0.3
  • editorconfig-checker ^4.0.2
  • husky ^4.3.8
  • minimist ^1.2.7
  • mkdirp ^1.0.4
  • run-parallel-limit ^1.1.0
  • standard-packages ^3.10.0
  • tape ^5.6.1
  • node >=18

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

ES6 default props

Telus Standard takes a rule from AirBnB that enforces defaultProps for every non-required prop; but defaultProps are being deprecated for functional components e.g. facebook/react#16210 .
There's a flag we could use for that linting rule, ignoreFunctionalComponents (default is false).
As well as being deprecated, defaultProps are a bit of a pain especially when you want the default prop to be undefined (I was just writing a utility function to default all a FC's default props to undefined which is what prompted me to write this)
we recommend adding that flag to our linting and start using ES6 prop defaults as recommended? (i.e. like const Something = ({ variant = 'default' }) => {...
we suggest that Telus Standard add that flag.
Default props will still be required for any class components (where they make sense and are more useful)

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.