Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/app-basic/.config/.cprc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "5.26.9"
"version": "6.1.0"
}
30 changes: 0 additions & 30 deletions examples/app-basic/.config/.eslintrc

This file was deleted.

27 changes: 19 additions & 8 deletions examples/app-basic/.config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,28 @@ to issues around working with the project.

### Extending the ESLint config

Edit the `.eslintrc` file in the project root in order to extend the ESLint configuration.
Edit the `eslint.config.mjs` file in the project root to extend the ESLint configuration. The following example disables deprecation notices for source files.

**Example:**

```json
{
"extends": "./.config/.eslintrc",
"rules": {
"react/prop-types": "off"
}
}
```javascript
import { defineConfig } from 'eslint/config';
import baseConfig from './.config/eslint.config.mjs';

export default defineConfig([
{
ignores: [
//...
],
},
...baseConfig,
{
files: ['src/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-deprecated': 'off',
},
},
]);
```

---
Expand Down
38 changes: 38 additions & 0 deletions examples/app-basic/.config/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
*
* In order to extend the configuration follow the steps in
* https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-eslint-config
*/

import { defineConfig } from 'eslint/config';
import grafanaConfig from '@grafana/eslint-config/flat.js';

export default defineConfig([
...grafanaConfig,
{
rules: {
'react/prop-types': 'off',
},
},
{
files: ['src/**/*.{ts,tsx}'],

languageOptions: {
parserOptions: {
project: './tsconfig.json',
},
},

rules: {
'@typescript-eslint/no-deprecated': 'warn',
},
},
{
files: ['./tests/**/*'],

rules: {
'react-hooks/rules-of-hooks': 'off',
},
},
]);
3 changes: 0 additions & 3 deletions examples/app-basic/.eslintrc

This file was deleted.

39 changes: 39 additions & 0 deletions examples/app-basic/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { defineConfig } from 'eslint/config';
import baseConfig from './.config/eslint.config.mjs';

export default defineConfig([
{
ignores: [
'**/logs',
'**/*.log',
'**/npm-debug.log*',
'**/yarn-debug.log*',
'**/yarn-error.log*',
'**/.pnpm-debug.log*',
'**/node_modules/',
'.yarn/cache',
'.yarn/unplugged',
'.yarn/build-state.yml',
'.yarn/install-state.gz',
'**/.pnp.*',
'**/pids',
'**/*.pid',
'**/*.seed',
'**/*.pid.lock',
'**/lib-cov',
'**/coverage',
'**/dist/',
'**/artifacts/',
'**/work/',
'**/ci/',
'test-results/',
'playwright-report/',
'blob-report/',
'playwright/.cache/',
'playwright/.auth/',
'**/.idea',
'**/.eslintcache',
],
},
...baseConfig,
]);
Loading