├── .npmrc ├── .github ├── CODEOWNERS ├── release-please.yml ├── workflows │ └── npm-build.yml ├── dependabot.yml └── policies │ └── branch-protection.yml ├── .release-please-manifest.json ├── prettier.config.js ├── CHANGELOG.md ├── index.js ├── release-please-config.json ├── CODE_OF_CONDUCT.md ├── package.json ├── LICENSE ├── SUPPORT.md ├── .gitignore ├── SECURITY.md ├── .pipelines └── release.yml ├── core.js └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | "auto-install-peers=true" -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @microsoftgraph/msgraph-devx-eng 2 | -------------------------------------------------------------------------------- /.release-please-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | ".": "4.2.0" 3 | } -------------------------------------------------------------------------------- /.github/release-please.yml: -------------------------------------------------------------------------------- 1 | manifest: true 2 | primaryBranch: main 3 | handleGHRelease: true 4 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | endOfLine: 'auto', 4 | printWidth: 120, 5 | semi: true, 6 | singleQuote: true, 7 | trailingComma: 'none', 8 | tabWidth: 2, 9 | useTabs: false 10 | }; 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [4.2.0](https://github.com/microsoftgraph/eslint-config-msgraph/compare/v4.1.1...v4.2.0) (2024-11-29) 4 | 5 | 6 | ### Features 7 | 8 | * adds dependabot configuration ([b6e2a28](https://github.com/microsoftgraph/eslint-config-msgraph/commit/b6e2a289728e617267c7333118666451e5de1fc6)) 9 | -------------------------------------------------------------------------------- /.github/workflows/npm-build.yml: -------------------------------------------------------------------------------- 1 | name: CI build 2 | 3 | on: 4 | push: 5 | pull_request: 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: actions/setup-node@v4 14 | with: 15 | node-version: 20 16 | - run: npm ci 17 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const core = require('./core.js'); 2 | core.extends = [...core.extends, 'plugin:react/recommended']; 3 | core.plugins = [...core.plugins, 'react']; 4 | core.rules = { 5 | 'react/no-unstable-nested-components': ['warn', { allowAsProps: true }], 6 | ...core.rules 7 | }; 8 | core.settings = { 9 | react: { 10 | version: 'detect' 11 | } 12 | }; 13 | module.exports = core; -------------------------------------------------------------------------------- /release-please-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", 3 | "release-type": "node", 4 | "include-component-in-tag": false, 5 | "pull-request-header": ":rocket: A new release is coming up!", 6 | "packages": { 7 | ".":{ 8 | "extra-files": [ 9 | "index.js", "core.js", "prettier.config.js" 10 | ] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 10 8 | commit-message: 9 | prefix: "chore(deps): update dependency" 10 | 11 | - package-ecosystem: npm 12 | directory: "/" 13 | schedule: 14 | interval: daily 15 | open-pull-requests-limit: 10 16 | groups: 17 | eslint: 18 | patterns: 19 | - "*eslint*" 20 | commit-message: 21 | prefix: "chore(deps): update dependency" 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@microsoft/eslint-config-msgraph", 3 | "version": "5.0.0", 4 | "description": "A sharable eslint config for Microsoft Graph web teams to use as a base set of linting rules", 5 | "main": "index.js", 6 | "files": [ 7 | "index.js", 8 | "prettier.config.js", 9 | "core.js" 10 | ], 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "author": "Microsoft", 15 | "license": "MIT", 16 | "peerDependencies": { 17 | "@typescript-eslint/eslint-plugin": "^8.0.0-alpha.54", 18 | "@typescript-eslint/parser": "^8.0.0-alpha.54", 19 | "eslint": "^9.7.0", 20 | "eslint-config-prettier": "^10.0.1", 21 | "eslint-plugin-prefer-arrow": "^1.2.3", 22 | "eslint-plugin-react": "^7.34.1", 23 | "prettier": "^3.2.5" 24 | }, 25 | "publishConfig": { 26 | "access": "public" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # TODO: The maintainer of this repo has not yet edited this file 2 | 3 | **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? 4 | 5 | - **No CSS support:** Fill out this template with information about how to file issues and get help. 6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). CSS will work with/help you to determine next steps. 7 | - **Not sure?** Fill out an intake as though the answer were "Yes". CSS will help you decide. 8 | 9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* 10 | 11 | # Support 12 | 13 | ## How to file issues and get help 14 | 15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 17 | feature request as a new Issue. 18 | 19 | For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE 20 | FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER 21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**. 22 | 23 | ## Microsoft Support Policy 24 | 25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 26 | -------------------------------------------------------------------------------- /.github/policies/branch-protection.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) Microsoft Corporation. 2 | # Licensed under the MIT License. 3 | 4 | # File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1. 5 | 6 | name: eslint-config-msgraph-branch-protection 7 | description: Branch protection policy for the eslint-config-msgraph repository 8 | resource: repository 9 | configuration: 10 | branchProtectionRules: 11 | 12 | # The following GitHub PolicyService properties are not yet supported: whoCanDismissReviews 13 | - branchNamePattern: main 14 | # This branch pattern applies to the following branches as of 06/08/2023 16:42:12: 15 | # main 16 | 17 | # Specifies whether this branch can be deleted. boolean 18 | allowsDeletions: false 19 | # Specifies whether forced pushes are allowed on this branch. boolean 20 | allowsForcePushes: false 21 | # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean 22 | dismissStaleReviews: true 23 | # Specifies whether admins can overwrite branch protection. boolean 24 | isAdminEnforced: false 25 | # Indicates whether "Require a pull request before merging" is enabled. boolean 26 | requiresPullRequestBeforeMerging: true 27 | # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required 28 | requiredApprovingReviewsCount: 1 29 | # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean 30 | requireCodeOwnersReview: true 31 | # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. 32 | requiresCommitSignatures: false 33 | # Are conversations required to be resolved before merging? boolean 34 | requiresConversationResolution: true 35 | # Are merge commits prohibited from being pushed to this branch. boolean 36 | requiresLinearHistory: false 37 | # Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status 38 | requiredStatusChecks: 39 | - GitOps/AdvancedSecurity 40 | - license/cla 41 | # Require branches to be up to date before merging. Requires requiredStatusChecks. boolean 42 | requiresStrictStatusChecks: true 43 | # Indicates whether there are restrictions on who can push. boolean. Requires whoCanPush. 44 | restrictsPushes: false 45 | # Restrict who can dismiss pull request reviews. boolean 46 | restrictsReviewDismissals: false 47 | 48 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* 131 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). 40 | 41 | 42 | -------------------------------------------------------------------------------- /.pipelines/release.yml: -------------------------------------------------------------------------------- 1 | name: eslint-config-msgraph release pipeline 2 | 3 | trigger: 4 | tags: 5 | include: 6 | - 'v*.*.*' 7 | 8 | stages: 9 | - stage: version_info 10 | pool: 11 | vmImage: ubuntu-latest 12 | jobs: 13 | - job: version 14 | steps: 15 | - checkout: self 16 | - task: NodeTool@0 17 | inputs: 18 | versionSpec: '20.x' 19 | displayName: Install nodejs v20.x 20 | # Read latest version from npm 21 | - script: | 22 | npm_version=$(npm show @microsoft/eslint-config-msgraph version) 23 | echo "##vso[task.setVariable variable=npm_version;isOutput=true]$npm_version" 24 | displayName: Read latest version from npmjs 25 | name: npm 26 | # Read version from package.json 27 | - script: | 28 | pkg_version=$(jq -r .version ./package.json) 29 | echo "##vso[task.setVariable variable=pkg_version;isOutput=true]$pkg_version" 30 | name: pkg 31 | 32 | - stage: publish 33 | dependsOn: version_info 34 | condition: ne(dependencies.version_info.outputs['version.npm.npm_version'], dependencies.version_info.outputs['version.pkg.pkg_version']) 35 | # check that pkg and npm versions are not equal 36 | jobs: 37 | - deployment: PublishToNPM 38 | displayName: Publish to npm 39 | pool: 40 | vmImage: 'windows-latest' 41 | # creates an environment if it doesn't exist 42 | environment: 'eslint-config-msgraph' 43 | strategy: 44 | runOnce: 45 | deploy: 46 | steps: 47 | - checkout: self 48 | - task: NodeTool@0 49 | inputs: 50 | versionSpec: '20.x' 51 | displayName: Install nodejs 20.x 52 | # building the package 53 | - script: | 54 | mkdir dist 55 | npm pack --pack-destination dist 56 | cp package.json dist 57 | displayName: build npm package 58 | # use ESRP to publish the package to NPM 59 | - task: EsrpRelease@7 60 | inputs: 61 | connectedservicename: 'Federated DevX ESRP Managed Identity Connection' 62 | keyvaultname: 'akv-prod-eastus' 63 | authcertname: 'ReferenceLibraryPrivateCert' 64 | signcertname: 'ReferencePackagePublisherCertificate' 65 | clientid: '65035b7f-7357-4f29-bf25-c5ee5c3949f8' 66 | Intent: 'PackageDistribution' 67 | ContentType: 'npm' 68 | ContentSource: 'Folder' 69 | FolderLocation: ./dist/ 70 | WaitForReleaseCompletion: true 71 | Owners: 'gavinbarron@microsoft.com,martinmusale@microsoft.com' 72 | Approvers: 'mmainer@microsoft.com,martinmusale@microsoft.com' 73 | ServiceEndpointUrl: 'https://api.esrp.microsoft.com' 74 | MainPublisher: 'ESRPRELPACMAN' 75 | DomainTenantId: 'cdc5aeea-15c5-4db6-b079-fcadd2505dc2' 76 | 77 | 78 | -------------------------------------------------------------------------------- /core.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | es6: true, 5 | node: true 6 | }, 7 | extends: [ 8 | 'eslint:recommended', 9 | 'plugin:@typescript-eslint/recommended-type-checked', 10 | 'plugin:@typescript-eslint/stylistic-type-checked', 11 | 'prettier' 12 | ], 13 | parser: '@typescript-eslint/parser', 14 | parserOptions: { project: './tsconfig.json' }, 15 | plugins: ['eslint-plugin-prefer-arrow', '@typescript-eslint'], 16 | rules: { 17 | '@typescript-eslint/class-literal-property-style': ['error', 'getters'], 18 | '@typescript-eslint/consistent-generic-constructors': 'error', 19 | '@typescript-eslint/consistent-indexed-object-style': 'warn', 20 | '@typescript-eslint/consistent-type-assertions': 'error', 21 | '@typescript-eslint/dot-notation': 'error', 22 | '@typescript-eslint/explicit-function-return-type': 'off', 23 | '@typescript-eslint/explicit-module-boundary-types': 'off', 24 | '@typescript-eslint/naming-convention': [ 25 | 'warn', 26 | { 27 | selector: 'variable', 28 | format: ['camelCase', 'UPPER_CASE', 'PascalCase'], 29 | leadingUnderscore: 'forbid', 30 | trailingUnderscore: 'forbid' 31 | }, 32 | { 33 | selector: ['property', 'accessor'], 34 | modifiers: ['private'], 35 | format: ['camelCase'], 36 | leadingUnderscore: 'allow' 37 | }, 38 | { 39 | selector: ['variable', 'function'], 40 | format: ['camelCase'], 41 | leadingUnderscore: 'allow' 42 | } 43 | ], 44 | '@typescript-eslint/no-shadow': [ 45 | 'error', 46 | { 47 | hoist: 'all' 48 | } 49 | ], 50 | '@typescript-eslint/no-unused-expressions': 'error', 51 | '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], 52 | '@typescript-eslint/prefer-for-of': 'error', 53 | '@typescript-eslint/prefer-function-type': 'error', 54 | '@typescript-eslint/prefer-optional-chain': 'error', 55 | '@typescript-eslint/prefer-readonly': 'error', 56 | '@typescript-eslint/restrict-template-expressions': ['error', { allowBoolean: true, allowNumber: true }], 57 | '@typescript-eslint/unified-signatures': 'error', 58 | 'dot-notation': 'off', 59 | eqeqeq: ['error', 'smart'], 60 | 'guard-for-in': 'error', 61 | 'linebreak-style': 'off', 62 | 'max-classes-per-file': ['error', 1], 63 | 'new-parens': ['error', 'always'], 64 | 'no-bitwise': 'error', 65 | 'no-caller': 'error', 66 | 'no-console': ['error', { allow: ['warn', 'error'] }], 67 | 'no-empty-function': 'off', 68 | 'no-eval': 'error', 69 | 'no-new-wrappers': 'error', 70 | 'no-shadow': 'off', 71 | 'no-throw-literal': 'error', 72 | 'no-trailing-spaces': 'error', 73 | 'no-undef-init': 'error', 74 | 'no-unused-expressions': 'off', 75 | 'no-var': 'error', 76 | 'object-shorthand': 'error', 77 | 'one-var': ['error', 'never'], 78 | 'prefer-arrow/prefer-arrow-functions': 'error', 79 | 'prefer-const': 'error', 80 | radix: 'error', 81 | 'spaced-comment': [ 82 | 'error', 83 | 'always', 84 | { 85 | markers: ['/'] 86 | } 87 | ] 88 | } 89 | }; 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # eslint-config-msgraph 2 | 3 | This repository contains a shareable ESLint and Prettier configuration used by the Microsoft Graph Developer Experience team. 4 | Suggestions for changes are greatly welcomed, please raise an [issue](https://github.com/microsoftgraph/eslint-config-msgraph/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) to discuss your suggestion. 5 | 6 | ## Installation 7 | 8 | To install the configuration, run the following command: 9 | 10 | ```bash 11 | npm install --save-dev @microsoft/eslint-config-msgraph 12 | ``` 13 | 14 | ### eslint configuration 15 | 16 | #### non-React projects 17 | 18 | If your project does not contain react components, use this configuration. 19 | 20 | In your project's eslint config file, add the following entry in your `extends` array: 21 | 22 | ```js 23 | extends: ['@microsoft/eslint-config-msgraph/core'], 24 | ``` 25 | 26 | #### React projects 27 | 28 | If your project contains react components, use this configuration instead. 29 | 30 | In your project's eslint config file, add the following entry in your `extends` array: 31 | 32 | ```js 33 | extends: ['@microsoft/eslint-config-msgraph'], 34 | ``` 35 | 36 | ### Prettier configuration 37 | 38 | To use the shared Prettier config, add a `prettier.config.cjs` file with the following contents: 39 | 40 | ```js 41 | module.exports = { 42 | ...require('@microsoft/eslint-config-msgraph/prettier.config'), 43 | // add any overrides here 44 | }; 45 | ``` 46 | 47 | ## Feedback and Requests 48 | 49 | Please use [GitHub Issues](https://github.com/microsoftgraph/eslint-config-msgraph/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) for bug reports and feature requests. We highly recommend you browse existing issues before opening new issues. 50 | 51 | ## Contributing 52 | 53 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 54 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 55 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 56 | 57 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 58 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 59 | provided by the bot. You will only need to do this once across all repos using our CLA. 60 | 61 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 62 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 63 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 64 | 65 | ## Trademarks 66 | 67 | This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft 68 | trademarks or logos is subject to and must follow 69 | [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). 70 | Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. 71 | Any use of third-party trademarks or logos are subject to those third-party's policies. 72 | 73 | ## License 74 | 75 | All files in this GitHub repository are subject to the [MIT license](https://github.com/microsoftgraph/eslint-config-msgraph/blob/main/LICENSE). This project also references fonts and icons from a CDN, which are subject to a separate [asset license](https://static2.sharepointonline.com/files/fabric/assets/license.txt). 76 | 77 | ## Code of Conduct 78 | 79 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. --------------------------------------------------------------------------------