chore: remove lint exceptions for files in `examples` folder (#13346)

This commit is contained in:
Tom Mrazauskas 2022-10-01 10:01:13 +03:00 committed by GitHub
parent aae0d3ac34
commit c6b812da65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 17 additions and 36 deletions

View File

@ -216,8 +216,7 @@ module.exports = {
{
files: ['examples/**/*'],
rules: {
'import/no-unresolved': ['error', {ignore: ['^react-native$']}],
'import/order': 'off',
'no-restricted-imports': 'off',
},
},
{

View File

@ -1,6 +1,5 @@
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {describe, expect, it, jest} from '@jest/globals';
import {AppComponent} from './app.component';
import {DataService} from './shared/data.service';

View File

@ -1,5 +1,4 @@
import {Component} from '@angular/core';
import {DataService} from './shared/data.service';
@Component({

View File

@ -1,6 +1,5 @@
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
@NgModule({

View File

@ -1,6 +1,5 @@
import {TestBed} from '@angular/core/testing';
import {beforeEach, describe, expect, it, jest} from '@jest/globals';
import {DataService} from './data.service';
import {SubService} from './sub.service';

View File

@ -1,5 +1,4 @@
import {Injectable} from '@angular/core';
import {SubService} from './sub.service';
@Injectable()

View File

@ -1,6 +1,5 @@
import {TestBed} from '@angular/core/testing';
import {beforeEach, describe, expect, it} from '@jest/globals';
import {SubService} from './sub.service';
describe('Service: SubService', () => {

View File

@ -2,11 +2,10 @@
import Enzyme, {shallow} from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import CheckboxWithLabel from '../CheckboxWithLabel';
Enzyme.configure({adapter: new Adapter()});
import CheckboxWithLabel from '../CheckboxWithLabel';
it('CheckboxWithLabel changes the text after click', () => {
// Render a checkbox with label in the document
const checkbox = shallow(<CheckboxWithLabel labelOn="On" labelOff="Off" />);

View File

@ -1,9 +1,6 @@
// mongo-environment.js
const NodeEnvironment = require('jest-environment-node').default;
const path = require('path');
const fs = require('fs');
import fs from 'fs';
import path from 'path';
import NodeEnvironment from 'jest-environment-node';
const globalConfigPath = path.join(__dirname, 'globalConfig.json');

View File

@ -1,9 +1,6 @@
// setup.js
const path = require('path');
const fs = require('fs');
const {MongoMemoryServer} = require('mongodb-memory-server');
import fs from 'fs';
import path from 'path';
import {MongoMemoryServer} from 'mongodb-memory-server';
const globalConfigPath = path.join(__dirname, 'globalConfig.json');

View File

@ -1,7 +1,5 @@
// teardown.js
const path = require('path');
const fs = require('fs');
import fs from 'fs';
import path from 'path';
const globalConfigPath = path.join(__dirname, 'globalConfig.json');

View File

@ -6,9 +6,9 @@
* @flow
*/
import Intro from './Intro';
import React, {Component} from 'react';
import {AppRegistry} from 'react-native';
import Intro from './Intro';
class App extends Component<{}> {
render() {

View File

@ -1,7 +1,6 @@
// Copyright 2004-present Facebook. All Rights Reserved.
import {createRef} from 'react';
import * as TestUtils from 'react-dom/test-utils';
import CheckboxWithLabel from '../CheckboxWithLabel';

View File

@ -2,8 +2,8 @@
'use strict';
import Clock from '../Clock';
import renderer from 'react-test-renderer';
import Clock from '../Clock';
jest.useFakeTimers();
Date.now = jest.fn(() => 1482363367071);

View File

@ -2,8 +2,8 @@
'use strict';
import Link from '../Link';
import renderer from 'react-test-renderer';
import Link from '../Link';
it('renders correctly', () => {
const tree = renderer

View File

@ -2,7 +2,6 @@
import * as React from 'react';
import * as TestUtils from 'react-dom/test-utils';
const CheckboxWithLabel = require('../CheckboxWithLabel').default;
it('CheckboxWithLabel changes the text after click', () => {

View File

@ -1,13 +1,12 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
import {jest} from '@jest/globals';
import Memory from '../memory';
import Memory from '../Memory';
import makeCalc from '../calc';
import sub from '../sub';
import sum from '../sum';
import makeCalc from '../calc';
jest.mock('../memory');
jest.mock('../Memory');
jest.mock('../sub');
jest.mock('../sum');

View File

@ -1,6 +1,6 @@
import Memory from './Memory';
import sub from './sub';
import sum from './sum';
import Memory from './memory';
type Op = 'MemoryAdd' | 'MemoryClear' | 'MemorySub' | 'Sub' | 'Sum';